[Moin-user] ExcelPastedTable vs CSV parser (tabs)

Jim Kleckner jek-gmane at kleckner.net
Fri Jun 20 19:14:54 EDT 2008


R.Bauer wrote:
> Jim Kleckner schrieb:
>> I gave ExcelPastedTable a try and it makes a nice way for people to 
>> copy/paste simple tab-separated information to/from a spreadsheet.
>>   http://moinmo.in/parser/ExcelPastedTable.py
>>
>> Note that according to the file, it requires a modification to MoinMoin
>> to eliminate expanding of tabs in "rawtext = self.raw.expandtabs()".
>> I went ahead and made that change to try this out.
>>
>> It seems there is overlap between the CSV parser and this one.
>> This principle difference is using a tab separator.
>>
>> The first question is, would it be possible to allow the CSV parser to 
>> use tabs?  (I tried a few obvious ways without luck).  I guess the 1.7 
>> version might work with unicode?
>>
> 
> a) yes it uses the sniffer and the preferred_delimiters = [',', '\t',
> ';', ' ', ':']

Nice, but it is desirable to be able to be explicit to handle
the case that you have more than one delimiter type on each line.

Is it possible to be explicit that the delimiter is tab?

Is this behavior with the sniffer new to 1.7?

> b) yes
> 
> if you like to try out you can go to http://test17.moinmo.in

Seems a bit strange.  See:
  http://test17.moinmo.in/TestCsvWithTabs
and note the extra 3 empty columns.





More information about the Moin-user mailing list