0

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?

2
Contributors
1
Reply
8
Views
11 Years
Discussion Span
Last Post by bumsfeld
0

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
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.