How to I access the filename with TkFileDialog?

I

imphasing

I'm writing a python program to open a file, and display it onscreen,
but I can't seem to find the var that "tkOpenFileName" returns to. It's
not much use if you can't get the filename you just chose, so there
must be a way to get it. Could anyone help me?

Thanks,
Alex
 
V

Vincent Wehren

imphasing said:
I'm writing a python program to open a file, and display it onscreen,
but I can't seem to find the var that "tkOpenFileName" returns to. It's
not much use if you can't get the filename you just chose, so there
must be a way to get it. Could anyone help me?

Thanks,
Alex

openfilename=tkFileDialog.askopenfilename(filetypes=[("all files", "*")])
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,219
Messages
2,571,127
Members
47,744
Latest member
FrederickM

Latest Threads

Top