On 19/07/12 23:10:04, Dennis Lee Bieber wrote:
> On Thu, 19 Jul 2012 13:01:37 -0500, Tim Chase
> declaimed the following in
> gmane.comp.python.general:
>
>> It just seems unfortunate that the sniffer would ever consider
>> [a-zA-Z0-9] as a valid delimiter.
+1
> I'd suspect the sniffer l
On Thu, 19 Jul 2012 15:52:12 +0200, Hans Mulder wrote:
> Perhaps it should be documented that the Sniffer doesn't work on
> single-column data.
>
> If you really need to read a one-column csv file, you'll have to find
> some other way to produce a Dialect object. Perhaps the predefined
> 'cvs.ex
On 07/19/12 08:52, Hans Mulder wrote:
> Perhaps it should be documented that the Sniffer doesn't work
> on single-column data.
I think this would involve the least change in existing code, and
go a long way towards removing my surprise. :-)
> If you really need to read a one-column csv file, yo
On 19/07/12 13:21:58, Tim Chase wrote:
> tim@laptop:~/tmp$ python
> Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48)
> [GCC 4.4.5] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
import csv
from cStringIO import StringIO
s = StringIO('Email\n...@exa
On 07/19/12 06:21, Tim Chase wrote:
> tim@laptop:~/tmp$ python
> Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48)
> [GCC 4.4.5] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
import csv
from cStringIO import StringIO
s = StringIO('Email\n...@exampl
On Thu, 19 Jul 2012 06:21:58 -0500, Tim Chase wrote:
> tim@laptop:~/tmp$ python
> Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48) [GCC 4.4.5] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
import csv
from cStringIO import StringIO
s = StringIO('E
Tim Chase wrote:
> tim@laptop:~/tmp$ python
> Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48)
> [GCC 4.4.5] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
import csv
from cStringIO import StringIO
s = StringIO('Email\n...@example.com\n...@example
tim@laptop:~/tmp$ python
Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import csv
>>> from cStringIO import StringIO
>>> s = StringIO('Email\n...@example.com\n...@example.org\n')
>>> s.seek(0)
>>> d