I had some data in excel file. I changed the file to .csv file and tried to write some python code to read the file.
But I am getting some unpredictable outputs. My Code is like this:
INPUT_DIR = os.path.join(os.getcwd(),"Input")
OUTPUT_DIR = os.path.join(os.getcwd(),"Output")
print INPUT_DIR, OUTPUT_DIR 
def read_csv():    
    files = os.listdir(INPUT_DIR)
    for file in files:
        file_full_name = os.path.join(INPUT_DIR,file)
        print file_full_name
        f = open(file_full_name,'r')
        for line in f.readlines():
            print "Line: ", line
def create_sql_file():
    print "Hi"
if __name__ == '__main__':
    read_csv()
    create_sql_file()
This gives very peculiar output:
 C:\calcWorkspace\13.1.1.0\PythonTest\src\Input C:\calcWorkspace\13.1.1.0\PythonTest\src\Output
C:\calcWorkspace\13.1.1.0\PythonTest\src\Input\Country Risk System Priority Data_01232013 - Copy.csv
Line:  PK**
Does someone know of this issue?
 
    