dummy tk windows

Elaine Jackson elainejackson7355 at home.com
Fri Sep 17 05:19:26 EDT 2004


"Paul Miller" <pwmiller1 at adelphia.net> wrote in message
news:pan.2004.09.17.04.39.08.814115 at adelphia.net...
<snip> HTH

It did. Thank you. I made a wrapper for this stuff that I'll include here for
the benefit of anyone who may be following the discussion from the sidelines.

Peace

def dialog(className):
    from Tkinter import Tk
    from tkFileDialog import Open,SaveAs,Directory
    Tk().withdraw()
    name = eval(className)().show()
    if className=='Directory': return name
    mode = (className=='Open' and 'r') or (className=='SaveAs' and 'w')
    return file(name,mode)





More information about the Python-list mailing list