[Tutor] Re: How can use Windows Exlporer's browse file method in a python script (Tkinter)?

Bill Bell bill-bell@bill-bell.hamilton.on.ca
Wed, 22 Aug 2001 20:58:43 -0400


"Proud Newbie" <proudsoul@hotmail.com> wrote, in part:
> How can use Windows Exlporer's browse file method in a python script
> (Tkinter)? Say, I want to use Windows Exlporer's browse file method to
> let users browse and locate a file. How do I do that?

import win32ui
SAVEAS = 0
OPEN = 1
dlg = win32ui.CreateFileDialog( SAVEAS )
dlg.DoModal()

For a less rarified example, take a look at 
C:\Python21\win32\scripts\regsetup.py or search your Python21 
folder for 'CreateFileDialog'. Documentation is available by 
searching the ActiveState doc on the same term.

Bill