Joined July 2014
·
Posted to
Python trick to read single line as CSV
over 1 year
ago
import csv
from StringIO import StringIO
file_like_obj = StringIO('value1,"oh look, an embedded comma",value3')
csv_reader = csv.reader(file_like_obj)
for row in csv_reader:
print row[1]
break
I think most of those are actually bad advice. for example the "Copy files with a matching pattern to a new directory" is subject to
getconf ARG_MAX
in the shell...