<html style="direction: ltr;">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<style type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
</head>
<body style="direction: ltr;"
bidimailui-detected-decoding-type="UTF-8" text="#000000"
bgcolor="#FFFFFF">
<p>Hi All,<br>
</p>
<p><br>
</p>
<p>I've created a project by Eric its structure as following:</p>
<p><a class="moz-txt-link-freetext" href="http://i.stack.imgur.com/fgpFa.jpg">http://i.stack.imgur.com/fgpFa.jpg</a></p>
<p><br>
</p>
<p>I can run it successfully in the IDE by specifying (<a class="moz-txt-link-freetext" href="http://i.stack.imgur.com/vskbO.jpg">http://i.stack.imgur.com/vskbO.jpg</a>):</p>
<p> - "c:\trunk" as working directory<br>
- "MyProject\main.py" as main script<br>
</p>
<p><br>
</p>
<p>but it I can't run it by command line because I get:</p>
<br>
<pre><pre><code>ImportError: No module named package1.Settings</code></pre></pre>
<p><br>
</p>
<p>PS</p>
<p>I added "c:\trunk\Project" to system path (see run.bat please):</p>
<pre><pre>set PATH=%PATH%;%CD%
python MyProject\main.py
pause</pre></pre>
here is the running log:<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 class="pastecode" color="#008B00">"MyProject\main.py"</font>, line 17, in <module>
from MyProject.package1.Settings import Settings
File <font class="pastecode" 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>
<pre class="moz-signature" cols="72">--
Best Regards
Muhammad Bashir Al-Noimi
My Blog: <a class="moz-txt-link-freetext" href="http://mbnoimi.net">http://mbnoimi.net</a></pre>
</body>
</html>