[Pythonmac-SIG] Setting paths
Jack Jansen
Jack.Jansen at cwi.nl
Wed Jul 21 11:32:39 CEST 2004
On 21-jul-04, at 11:10, Aldo Bergamini wrote:
> There is a bunch of folders at some location like:
>
> /Users/aldo/Documents/ .... /Pegasus/Objectspace
>
> In the Pegasus folder there is an __init__.py file, as well as in the
> subfolders that should host different parts of the would-be-package.
>
> I tried to set an environment variable hoping to pass some information
> the the interpreter:
>
>> set PYTHONPATH =
>> "/Users/aldo/Documents/Work/Amministrazione/Budgeting/
>> Budget_proj/Pegasus/"
If Pegasus is the package you want to import you should make sure that
the directory *above that* is in sys.path. Moreover, the PYTHONPATH
variable must end up in the environment too. Something like
>> setenv PYTHONPATH
>> /Users/aldo/Documents/Work/Amministrazione/Budgeting/Budget_proj
or
>> PYTHONPATH=/Users/aldo/Documents/Work/Amministrazione/Budgeting/
>> Budget_proj
>> export PYTHONPATH
depending on whether you use bash or tcsh.
--
Jack Jansen, <Jack.Jansen at cwi.nl>, http://www.cwi.nl/~jack
If I can't dance I don't want to be part of your revolution -- Emma
Goldman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2086 bytes
Desc: not available
Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20040721/cebce105/smime.bin
More information about the Pythonmac-SIG
mailing list