Skip to content

Instantly share code, notes, and snippets.

@ashwin
Created February 25, 2014 07:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ashwin/9204331 to your computer and use it in GitHub Desktop.
Save ashwin/9204331 to your computer and use it in GitHub Desktop.
File Open dialog in Python to read in a file path
import Tkinter
import tkFileDialog
def main():
Tkinter.Tk().withdraw() # Close the root window
in_path = tkFileDialog.askopenfilename()
print in_path
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment