Quick and dirty dialogs?

Robert D. Young Robert at AbilitySys.com
Mon May 2 14:53:15 EDT 2005


I use quick-and-dirty code like this:

############################################################################
# Get source directory and text file
############################################################################
Root = Tkinter.Tk()
Root.title(programname)
srcdir = tkFileDialog.askdirectory(title='Choose the source directory',
initialdir='C:\\')
srcfile = tkFileDialog.askopenfilename(title='Choose the text file',
initialdir=srcdir)
Root.destroy()



- Robert


<andy at andybak.net> wrote in message
news:1115059445.673382.218000 at g14g2000cwa.googlegroups.com...
> What's the easiest way for a script to throw up simple dialogs such as
> file select and alerts?
>
> I thought there was something in the standard library that didn't need
> TK and was cross-platform but I can't seem to get my Google-fu working
> well enough to find it.
>





More information about the Python-list mailing list