Gabriel Genellina gagsl-py2 at
Fri Jan 29 21:18:42 CET 2010

En Wed, 27 Jan 2010 15:48:23 -0300, George Trojan <george.trojan at>  
> Arnaud Delobelle wrote:
>> George Trojan <george.trojan at> writes:
>>> Inspired by the 'Default path for files' thread I tried to use
>>> sitecustomize in my code. What puzzles me is that the's main()
>>> is not executed. My is
> That gave me the explanation why the above happens: when site is  
> imported, the current directory is not yet prepended to sys.path.
> I wanted to have library location specific to application without having  
> to explicitly change sys.path in all App-Top-Dir/bin/*.py. I thought  
> creating bin/ would do the trick.

Put in any of those directories already in sys.path; on  
Python 2.6, you may put on your "user site directory",  
~/.local/lib/python2.6/site-packages (see PEP370; it won't show up in  
sys.path unless the directory actually exists)

Gabriel Genellina

More information about the Python-list mailing list