[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] wxPyWidgetTests

From: Karsten Hilbert
Subject: Re: [Gnumed-devel] wxPyWidgetTests
Date: Fri, 3 Sep 2004 09:57:49 +0200
User-agent: Mutt/

> When I run wxPython2.5 I do this first in a terminal:
>               address@hidden:~$ export PATH=$PATH:/opt/wx/2.5/bin
>                 address@hidden:~$ export LD_LIBRARY_PATH=/opt/wx/2.5/lib
>                 address@hidden:~$ export WXDIR=/usr/src/wxPythonSrc-
>                 address@hidden:~$ export PYTHONPATH=$WXDIR/wxPython.
> I would then assume that all files in directories below $PYTHONPATH that 
> would 
> be found, however not the case on my machine.
 import somefile

would only find somefile if it is directly in a directory
named in PYTHONPATH.

 import somedir.somefile


 from somedir import somefile

would find somefile in somedir below PYTHONPATH. One needs to
join the relative parts of the import to find the absolute
path for an imported module.

> When I snipped some code out of the demo into a file and ran it - it didn't 
> find the file it needed in a directory below the top level pythonpath.
Likely it expected a different directory structure somewhere.

GPG key ID E4071346 @
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346

reply via email to

[Prev in Thread] Current Thread [Next in Thread]