Hello All<br><br>I want to import a module I wrote to use it in a script. But, it is not in the same directory as the script I want to import it into. So my solution is to put the following piece of code in the script:<br><br>import os<br>os.chdir(<the direcotry where the module is kept>)<br>import <the module><br><br>This generates an error: 'ImportError: no module named <the module>'<br><br>If I do the exact same code in interactive mode, using ipython it works fine, but when I try it in a script I get the error. I've even used os.listdir() after changing the directory to confirm that the module is in the cwd (and it is).<br><br>Where am I going wrong?<br>(I use windows XP, and enthought edition python2.4)<br><br>Thanks<br>Izak<br><p>
                <hr size=1>Do you Yahoo!?<br> Everyone is raving about the <a href="http://us.rd.yahoo.com/evt=42297/*http://advision.webevents.yahoo.com/mailbeta"> all-new Yahoo! Mail.</a>