PYTHONPATH and module names
rusi
rustompmody at gmail.com
Mon Jul 1 14:39:46 EDT 2013
On Monday, July 1, 2013 11:59:35 PM UTC+5:30, Tobiah wrote:
> So today, I created a file called 'formatter.py',
> and my program broke. It turned out that I was
> also import 'gluon' from web2py, which in turn,
> somewhere, imported the regular python formatter.py
> with which I was not familiar.
>
> So the question is: Does one simply always have
> to be knowledgeable about existing python library
> names, or is having '.' in the python path just
> a bad idea? Is there a way, not having '.' in
> the path to explicitly specify the current directory?
> Something analogous to import ./foo ?
Are you familiar with absolute and relative imports:
http://docs.python.org/release/2.5/whatsnew/pep-328.html
More information about the Python-list
mailing list