is it possible that something works in python ide but not in the script
<p>Something weird... 
I was working on importing files from different folders..
and was working on python ide..</p>

<p>so my ide code:</p>

<pre><code>&gt;&gt;&gt; import os
&gt;&gt;&gt; os.chdir("..")
&gt;&gt;&gt; os.chdir("lib")
&gt;&gt;&gt; os.chdir("native")
&gt;&gt;&gt; os.getcwd()
'/.../.../Programming/lib/native'
&gt;&gt;&gt; from category import *
</code></pre>

<p>works great..
but exactly same on my python file:</p>

<pre><code>import os
import sys
#get current working directory
cur_dir = os.getcwd()
#move up one level
os.chdir("..")
new_cur_dir = os.getcwd()
print new_cur_dir
#move down to native
try:
 os.chdir("lib")
 print os.getcwd()
except IOError as e:
    sys.exit("Exitting: 'lib' folder missing!!")

try:
os.chdir("native")
print os.getcwd()
from category import *
from pilottest import *
from datainstance import *
from similar import *
from collections import defaultdict
from item import *
from pilottest import *
from infernumber import *

except IOError as e:
          sys.exit("Exitting: 'native' folder missing!!")
</code></pre>

<p>Error:</p>

<pre><code>/../../Programming
/../../Programming/lib
/../../Programminglib/native
Traceback (most recent call last):
 File "foo.py", line 25, in &lt;module&gt;
  from category import *
ImportError: No module named category
</code></pre>
