How can I use "tkFileDialog.askopenfilename()"

Stephan Effelsberg b012414 at mail.dvz.fh-koeln.de
Tue Feb 13 06:40:28 EST 2001


iact21 schrieb:

> >> import tkSimpleDialg, Tkinter

It seems that you want tkFileDialog, not tkSimpleDialog.

> >> root = Tk()
> >> fn = tkFileDialog,askopenfilename()

Also take care of typos, dot instead of comma.

> error...
> Traceback (innermost last):
>     File "<stdin>", line 1, in ?
> NameError: tkFileDialog

See your import line ...

> Please..help..me...!!!

import tkFileDialog
# no own root window needed
fn = tkFileDialog.askopenfilename()





More information about the Python-list mailing list