Pythonwin default directory init

Mark Hammond MarkH at ActiveState.com
Sun Mar 11 23:34:02 CET 2001


Costas Menico wrote:

 > I use Pythonwin and I would like it if the File/Open or File/Save  would
 >  default to a directory of my choice when I start it up.    I have
 > tried making a startup module to set the paths of sys but that  doesn't
 >  seem to work. I have looked thru the .py files trying to  figure
 > out where I could fix this and can't find it.    Also setting it up
 >  as a shortcut on the Desktop defaults to the  Desktop.     Does
 > anyone know how to do this?

Assuming you are on Win2k (or possibly Win98), explorer itself remembers 
the directory to open these dialogs in.  It remembers the last directory 
you navigated to, even between runs of the application.  This can be 
prevented by internally passing an explicit directory, but Pythonwin 
chooses not to do this.   In Windows NT/95, the current directory is 
always used.

Mark.




More information about the Python-list mailing list