Here on Linux the same configuration works perfectly.<br>I built the same files as in your picture, with<br><br>$ cat MyProject/main.py<br>from MyProject.package1.Settings import Settings<br><br>$ cat MyProject/package1/Settings.py<br>

class Settings:                                                                                                                                                                    <br>    pass<br><br>So I suspect something wrong with the content of the files, perhaps some cyclic imports?<br>

<br>I would advice not to add in project files imports with the full project path, i.e. in main.py just state<br><br>from package1.Settings import Settings<br><br>instead of<br><br>from MyProject.package1.Settings import Settings<br>

<br>Anyway this is not the problem now.<br>You could post the content of your main.py, at least the first 20 lines.<br><br>Best regards<br><br>Leo<br><br><div class="gmail_quote">2011/10/12  <span dir="ltr"><<a href="mailto:admin@mbnoimi.net">admin@mbnoimi.net</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
  
    
    
  
  <div style="direction:ltr" text="#000000" bgcolor="#FFFFFF">
    Hi All,<br>
    <br>
    I've created a project by Eric its structure as following:<br>
    <br>
    <a href="http://i.stack.imgur.com/fgpFa.jpg" target="_blank">http://i.stack.imgur.com/fgpFa.jpg</a><br>
    <br>
    I can run it successfully in the IDE by specifying
    (<a href="http://i.stack.imgur.com/vskbO.jpg" target="_blank">http://i.stack.imgur.com/vskbO.jpg</a>):<br>
    <br>
     - "c:\trunk" as working directory<br>
     - "MyProject\main.py" as main script<br>
    <br>
    but it I can't run it by command line because I get:<br>
    <br>
    <pre><pre>ImportError: No module named package1.Settings</pre></pre>
    <br>
    <br>
    PS<br>
    <br>
    I added "c:\trunk\Project" to system path (see run.bat please):<br>
    <br>
    <pre><pre>set PATH=%PATH%;%CD%
python MyProject\main.py
pause</pre></pre>
    <br>
    <br>
    here is the running log:<br>
    <br>
    <pre><pre>C:\trunk>set PATH=C:\Python26\Lib\site-packages\PyQt4\bin;C:\Python26\Scripts;C:\Python26;C:\Program Files\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Bazaar;C:\ProgramFiles\doxygen\bin;C:\Program Files\WinMerge;C:\trunk

C:\trunk>python MyProject\main.py
Traceback (most recent call last):
  File <font color="#008B00">"MyProject\main.py"</font>, line 17, in <module>
    from MyProject.package1.Settings import Settings
  File <font color="#008B00">"C:\trunk\MyProject\main.py"</font>, line 17, in
 <module>
    from MyProject.package1.Settings import Settings
ImportError: No module named package1.Settings</pre></pre>
    <br><font color="#888888">
    <pre cols="72">-- 
Best Regards
Muhammad Bashir Al-Noimi
My Blog: <a href="http://mbnoimi.net" target="_blank">http://mbnoimi.net</a></pre>
  </font></div>

<br>_______________________________________________<br>
Eric mailing list<br>
<a href="mailto:Eric@riverbankcomputing.com">Eric@riverbankcomputing.com</a><br>
<a href="http://www.riverbankcomputing.com/mailman/listinfo/eric" target="_blank">http://www.riverbankcomputing.com/mailman/listinfo/eric</a><br>
<br></blockquote></div><br>