[wxPython-users] PyAlaMode - PyCrust inconsistency

Robin Dunn robin at alldunn.com
Mon Sep 4 10:45:55 PDT 2006


Dan Cherry wrote:
> When using PyCrust, I'm able to use the shell to import my program 
> modules by first importing os, then issuing an os.chdir('/folder/folder/')
> and following that with import mymodule.  Works fine.  It also works in 
> PyShell.
> 
> But when using the PyAlaMode shell, the exact same steps give an Import 
> Error: No module named mymodule.
> 
> I'm running Ubuntu 6.06 with
> Py 0.9.5
> Python 2.4.3 (#2, Apr 27 2006, 14:43:58)
> [GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2
> wxPython 2.6.3.3
> 
> I'm _not_ using PyWrap to initiate PyCrust, so I wouldn't think there'd 
> be any different wrapper code involved.
> 
> Any thoughts on why the same Py shell module would behave differently 
> when running in PyAlaMode?  Or how I can fix it?

I haven't yet looked into why, but the sys.path is different between the 
two.  In PyShell/PyCrust it includes '', which means to look in the 
current dir, but in PyAlaMode that item is '/usr/bin' which is where the 
pyalamode script is located.


-- 
Robin Dunn
Software Craftsman
http://wxPython.org  Java give you jitters?  Relax with wxPython!





More information about the wxpython-users mailing list