S Python wrote:
f = open(r'C:\test.txt', 'r')
foo = f.readline.split(',')
readline is the function/method name
readline() executes that function/method and returns a value
try typing in 'type(f.readline)' vs 'type(f.readline())'
you can't .split() a function but you may split its return value.
but it fails when I try:
import csv
myfile = open(r'c:\test.txt', 'r')
data = csv.Reader(myfile, delimeter = ',')
Python is case sensitive -- reader is different from Reader.
HTH,
Emile
_______________________________________________
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor