<div dir="ltr">Hello,<div><br></div><div>I have a class called My_Class in a subdir called Sub_Dir.</div><div><br></div><div style>in My_Class.py is the following</div><div style><br></div><div>







<p class=""><span class="">class</span> My_Class_Connector:</p>
<p class="">    <span class="">def</span> __init__(self,un,pw,qs_srv=<span class="">"<a href="http://domain.com">domain.com</a>"</span>):</p>
<p class="">        self.username = <span class="">un</span></p>
<p class="">        self.password = pw</p><p class="">...</p><p class=""><br></p><p class=""><br></p><p class="" style>Then I am trying to call from a script in the parent dir like this:</p><p class="" style></p><p class="">
from Sub_Dir.My_Class import *</p><p class="">q_api = My_Class.My_Class_Connector(string1,string2)</p><p class=""><br></p><p class="" style>I have not worked much with Python classes so I am not sure what I am doing wrong.  When running this from my script, I get the following error:</p>
<p class="" style><br></p><p class="" style></p><p class="">Traceback (most recent call last):</p><p class="">  File "testing.py", line 1, in <module></p><p class="">    from Sub_Dir.My_Class import *</p><p class="">
ImportError: No module named Sub_Dir.My_Class</p><p class=""><br></p><p class="" style>I have played around a bit with the calls (removing the My_Class in the q_api assignment to instantiate the object, etc).</p><p class="" style>
<br></p><p class="" style>Thanks for any help.</p><p class="" style><br></p><p class="" style>Kevin</p><p></p><p class="" style></p><p class=""><br></p><p></p><p></p></div></div>