[Python-Dev] sys.path[0]

David LeBlanc whisper@oz.net
Tue, 7 Jan 2003 21:25:04 -0800


This has been a "feature" of MS Windows since Windows 2.11 16 bit version.
Apps I was developing in the mid 80's had to capture and save the app's
startup directory in order to access resources local to the app because many
file ops and file dialogs would change the cwd.

David LeBlanc
Seattle, WA USA

> -----Original Message-----
> From: python-dev-admin@python.org [mailto:python-dev-admin@python.org]On
> Behalf Of Mark Hammond
> Sent: Tuesday, January 07, 2003 18:11
> To: python-dev@python.org
> Subject: RE: [Python-Dev] sys.path[0]
>
>
> [Tim]
> > [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
>
> Worse, displaying a standard "open file" dialog will change the current
> directory of your app to the current directory of the dialog when closed.
>
> Mark.
>
>
> _______________________________________________
> Python-Dev mailing list
> Python-Dev@python.org
> http://mail.python.org/mailman/listinfo/python-dev