On 2005-10-11 23:45:46 +0200, Paul Rubin <http://[EMAIL PROTECTED]> said:
> Markus Rosenstihl <[EMAIL PROTECTED]> writes: >> This looks ugly (I htink) and I wonder if there is a nicer way to >> strip commata and change the comma to a dot already when reading in. >> Or should i do it with a shell script before processing in python? > > First of all you should just set your locale to use comma instead > of dot as the numeric decimal, instead of translating commas to dots. Yes that is true, but most of the time I use a dot as numerical decimal. > > Second, for the field separation, see if you can configure the csv > module to do it for you. indeed, it did it correctly by default: read_file = csv.reader(open('2005_08_Rechnung_4963184011.dat', 'r'), delimiter="\t") for row in read_file: rechnung.append(row) -- http://mail.python.org/mailman/listinfo/python-list