Created
October 19, 2014 01:17
-
-
Save mkowoods/9e0fccf77df3c1161d2f to your computer and use it in GitHub Desktop.
Tkinter File Dialog
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from Tkinter import * | |
import tkFileDialog | |
root = Tk() | |
root.withdraw() | |
inputfile = tkFileDialog.askopenfilename(initialdir = 'C:\\', title = "Select Quote File", filetypes = [('csv files', '.csv')]) | |
print inputfile | |
import csv | |
if inputfile: | |
with open(inputfile, 'rb') as f: | |
for line in csv.reader(f): | |
print line |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment