DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   Python (http://www.daniweb.com/forums/forum114.html)
-   -   File Dialog window, save dialog window (http://www.daniweb.com/forums/thread39327.html)

katharnakh Feb 8th, 2006 4:19 am
File Dialog window, save dialog window
 
how to get the file dialog window and save dialog window in python. for example if select the File menu we can see Open menu option, when we click on that we get file open dialog window similarly when we click save as.... /save option we can see file save dialog. how to get in python?

bumsfeld Feb 11th, 2006 1:29 am
Re: File Dialog window, save dialog window
 
You mean something like that:
import tkFileDialog
# examples:
def open_it():
    filename = tkFileDialog.askopenfilename()
    print filename  # test
   
def save_it():
    filename = tkFileDialog.askopenfilename()
    print filename  # test
   
def save_as():
    filename = tkFileDialog.asksaveasfilename()
    print filename  # test


All times are GMT -4. The time now is 5:50 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC