View difference between Paste ID: 7xttvyru and rw5TP6im
SHOW: | | - or go back to the newest paste.
1
import os
2
import csv
3
4
my_path = 'Insert here the path to your file'
5
6-
with open(my_path, 'file_name.csv', 'rb') as my_file:
6+
with open(os.path.join(my_path, 'file_name.csv'), 'rb') as my_file:
7
    my_file_reader = cvs.reader(my_file)
8
    for row in my_file_reader:
9
        print row # or test something else
10
11
# PS: Credits to RealPython where I learnt the above algorithm ;)