[Python-Dev] sys.path[0]

Tim Peters tim.one@comcast.net
Tue, 07 Jan 2003 20:24:29 -0500


[Guido]
> ...
> Why would a GUI change the current directory?  That seems pretty
> broken.

Sure is.  Sean True and Mark Hammond and I all stumbled over this in the
spambayes project while working on the Outlook client.  Turned out that, on
Win9x but not 2K (or perhaps it had to do with which version and service
pack level of Outlook too ...), calling some subset of MS MAPI functions had
the side effect of changing the current directory to a system directory in
which some of MS's MAPI code lives.  That really screwed up subsequent
imports.  I don't claim it's Python's job to try to hide that, though.