[Twisted-Python] Re: Twisted 1.0.4 - Heavy search for `plugins.tml'

Itamar Shtull-Trauring itamar at itamarst.org
Sun Apr 27 21:25:47 EDT 2003


On Sun, 27 Apr 2003 19:20:57 -0400
Christopher Armstrong <radix at twistedmatrix.com> wrote:

> > Is Twisted modifying `sys.path' to include the first part of
> > argv[0]? Or is it standard Python behaviour?  I never noticed this
> > yet in my own scripts, but it might just have escaped my attention,
> > and I might not know.
> 
> Yeah, it's a common misconception about Python, actually. Yes, Python
> always adds the location of the main script to sys.path (the
> misconception is that people think it's "the current directory" rather
> than "the location of the main script", because people so often run
> their main scripts from the directory that they're located in.

Of course, mktap also adds "the current directory" (".") to sys.path.

-- 
Itamar Shtull-Trauring    http://itamarst.org/
http://www.zoteca.com -- Python & Twisted consulting




More information about the Twisted-Python mailing list