.pth in current directory: Why doesn't it work as the documentation says?

Philipp Hagemeister phihag at phihag.de
Mon May 18 05:49:15 EDT 2009

Where is the fault in my reasoning here?

1) According to http://docs.python.org/dev/install/, "The most
convenient way is to add a path configuration file to a directory that’s
already on Python’s path, (...).

2) Path configuration files have an extension of .pth, (...)"

1&2 => 3) A file test.pth with the content "/example/" should result in
sys.path containing "/example/".

4) "" (the current directory) is the first element of my sys.path

1&4 => 5) The current directory qualifies for "a directory that’s
already on Python’s path,"

1&3&5 => 6) echo /example/ > test.pth; python -c 'import
sys;print(repr(sys.path))' should contain '/example'.

I think I misinterpreted the documentation, but what exactly is wrong here?



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 204 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20090518/12a33749/attachment.sig>

More information about the Python-list mailing list