Strange import bug

Peter Hansen peter at
Tue Nov 25 00:53:52 CET 2003

Colin Brown wrote:
> "Adeodato Simó" <asp16 at> wrote in message
> news:mailman.1043.1069714565.702.python-list at
> ...
> The first (default) entry in sys.path is '', which means (I think) the
> current directory. 

Not quite true, as I recall.  I think it means "the directory from
which the main script was loaded", which is often but not always 
the same thing...  this is so that other .py files that are in the 
same directory as the main script can be found without any other 

(And if you think about it, loading scripts from the current directory
could be a security risk, or at least produce surprising results in
some cases.)


More information about the Python-list mailing list