Quick and dirty dialogs?

Discussion in 'Python' started by andy@andybak.net, May 2, 2005.

  1. Guest

    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.
    , May 2, 2005
    #1
    1. Advertising

  2. 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


    <> wrote in message
    news:...
    > 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.
    >
    Robert D. Young, May 2, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. countzero
    Replies:
    6
    Views:
    710
    Rolf Magnus
    Mar 11, 2005
  2. Robert Brewer

    RE: Quick and dirty dialogs?

    Robert Brewer, May 2, 2005, in forum: Python
    Replies:
    3
    Views:
    340
    Harlin Seritt
    May 2, 2005
  3. Ryan Davis
    Replies:
    10
    Views:
    181
    gabriele renzi
    Nov 19, 2004
  4. Erik Terpstra

    Quick and dirty word wrapping.

    Erik Terpstra, Sep 14, 2005, in forum: Ruby
    Replies:
    8
    Views:
    155
    Ezra Zygmuntowicz
    Sep 14, 2005
  5. Phil Meyer

    quick and dirty shell vs elegant perl

    Phil Meyer, Sep 18, 2003, in forum: Perl Misc
    Replies:
    1
    Views:
    104
    Tassilo v. Parseval
    Sep 18, 2003
Loading...

Share This Page