[Python-Dev] sys.path in interactive session

Guido van Rossum gvanrossum at gmail.com
Fri Jun 3 01:50:07 CEST 2005


I've always liked it this way; using "" instead of "." means that if
you os.path.join() it with a script name you don't get a spurious "./"
prepended.

I think that the "absolutizing" of sys.path entries is relatively new
(seems to have started in 2.3).

Also note that it's not really the current directory but the directory
containing the script; that is definitely intentional.

On 6/2/05, Reinhold Birkenfeld <reinhold-birkenfeld-nospam at wolke7.net> wrote:
> While looking at bug #779191, I saw that sys.path's first element
> is '' in interactive sessions, but the current dir otherwise. Is this
> intentional?
> 
> Reinhold
> 
> --
> Mail address is perfectly valid!
> 
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/guido%40python.org
> 


-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-Dev mailing list