'''
Created on Sep 26, 2011

@author: rodger
'''
# must include these imports to use the file chooser
import os
import tkFileDialog

    
def choose_file_to_open():
    """
    prompt for existing file, return the file (open for reading)
    """
    file = tkFileDialog.askopenfile(title="choose a file", initialdir=os.getcwd())
    return file

def processFile(file):
    '''
    process the lines in a file
    in this case we just print them
    '''
    for line in file:
        print line
        
processFile(choose_file_to_open())        