sort by column a csv file case insensitive

2012-04-16 Thread Lee Chaplin
Well, if I have a file like this one: EWIENER, edit, edgard, evan, erick, elliott,

sort by column a csv file case insensitive

2012-04-15 Thread Lee Chaplin
Hi all, I am trying to sort, in place, by column, a csv file AND sort it case insensitive. I was trying something like this, with no success: import csv import operator def sortcsvbyfield(csvfilename, columnnumber): with open(csvfilename, 'rb') as f: readit = csv.reader(f) thedata = li

object aware of others

2012-01-28 Thread Lee Chaplin
Hi all, I am trying to create an object that is aware of other objects created before itself, and when found, then copy some attributes from them, something like: class A: def __init__(self): self.myname = "IamA" print 'This is A' def foo(self): print "foo" def