On Fri, 11 Mar 2016 16:26:02 -0500, Fillmore wrote:
> On 3/11/2016 4:15 PM, Mark Lawrence wrote:
>>
>> https://docs.python.org/3/library/csv.html#csv.Dialect.doublequote
>>
>>
> thanks, but my TSV is not using any particular dialect as far as I
> understand...
>
> Thank you, anyway
Every variati
On 3/11/2016 2:41 PM, Fillmore wrote:
I have a TSV file containing a few strings like this (double quotes are
part of the string):
A big thank you to everyone who helped with this and with other
questions. My porting of one of my Perl scripts to Python is over now
that the two scripts produ
On 3/11/2016 4:15 PM, Mark Lawrence wrote:
https://docs.python.org/3/library/csv.html#csv.Dialect.doublequote
thanks, but my TSV is not using any particular dialect as far as I
understand...
Thank you, anyway
--
https://mail.python.org/mailman/listinfo/python-list
On 3/11/2016 4:14 PM, MRAB wrote:
>>> import csv
>>> s = '"Please preserve my doublequotes"\ttext1\ttext2'
>>> reader = csv.reader([s], delimiter='\t', quotechar=None)
>>> for row in reader:
... print(row[0])
...
"Please preserve my doublequotes"
>>>
This worked! thank you MRAB
--
On 11/03/2016 19:41, Fillmore wrote:
I have a TSV file containing a few strings like this (double quotes are
part of the string):
'"pragma: CacheHandler=08616B7E907744E026C9F044250EA55844CCFD52"'
After Python and the CVS module has read the file and re-printed the
value, t
On 2016-03-11 20:49, Fillmore wrote:
On 3/11/2016 2:41 PM, Fillmore wrote:
Is there some directive I can give CVS reader to tell it to stop
screwing with my text?
OK, I think I reproduced my problem at the REPL:
>>> import csv
>>> s = '"Please preserve my doublequotes"\ttext1\ttext2'
>>
Fillmore writes:
> Possibly, but I am having a hard time letting it know that it should
> leave each and every char alone
You're using the wrong module, then. To use the ‘csv’ module is to have
the sequence of characters parsed to extract component values, which
cannot also “leave each and every
On 11/03/2016 20:32, Fillmore wrote:
myReader = csv.reader(csvfile, delimiter='\t',quotechar='')
From reading that the quotechar is null. You have a single quote and
single quote with nothing in the middle.
Try this:
myReader = csv.reader(csvfile, delimiter='\t',quotechar="'")
i.e doublequ
On 3/11/2016 2:41 PM, Fillmore wrote:
Is there some directive I can give CVS reader to tell it to stop
screwing with my text?
OK, I think I reproduced my problem at the REPL:
>>> import csv
>>> s = '"Please preserve my doublequotes"\ttext1\ttext2'
>>> reader = csv.reader([s], delimiter='\t')
>
On 3/11/2016 3:05 PM, Joel Goldstick wrote:
Enter the python shell. Import csv
then type help(csv)
It is highly configurable
Possibly, but I am having a hard time letting it know that it should
leave each and every char alone, ignore quoting and just handle strings
as strings. I tried pl
On Fri, Mar 11, 2016 at 2:41 PM, Fillmore
wrote:
>
> I have a TSV file containing a few strings like this (double quotes are
> part of the string):
>
> '"pragma: CacheHandler=08616B7E907744E026C9F044250EA55844CCFD52"'
>
> After Python and the CVS mo
I have a TSV file containing a few strings like this (double quotes are
part of the string):
'"pragma: CacheHandler=08616B7E907744E026C9F044250EA55844CCFD52"'
After Python and the CVS module has read the file and re-printed the
value, the string has become:
&
Tim Arnold wrote:
> Hi, I need to do some scripting that interacts with CVS. I've been just
> doing system calls and parsing the output to figure out what's going on, but
> it would be nice to deal with CVS directly.
>
> Does anyone know of a python module I can use to interface with CVS?
> than
Hi, I need to do some scripting that interacts with CVS. I've been just
doing system calls and parsing the output to figure out what's going on, but
it would be nice to deal with CVS directly.
Does anyone know of a python module I can use to interface with CVS?
thanks,
--Tim Arnold
--
http://
14 matches
Mail list logo