Re: Question on the csv library

2009-08-27 Thread vsoler
On Aug 27, 9:42 pm, Andreas Waldenburger use...@geekmail.invalid wrote: On Thu, 27 Aug 2009 21:36:28 +0200 Andreas Waldenburger use...@geekmail.invalid wrote: [snip] Might I humbly suggest sheet = list(spamReader)  # ? Oh, and while I'm humbly suggesting: spam_reader instead of

Source code for csv module

2009-02-02 Thread vsoler
Hi you all, I just discovered the csv module here in the comp.lang.python group. I have found its manual, which is publicly available, but since I am still a newby, learning techniques, I was wondering if the source code for this module is available. Is it possible to have a look at it? Thanks

Re: Source code for csv module

2009-02-02 Thread vsoler
On 2 feb, 21:51, Jon Clements jon...@googlemail.com wrote: On 2 Feb, 20:46, vsoler vicente.so...@gmail.com wrote: Hi you all, I just discovered the csv module here in the comp.lang.python group. I have found its manual, which is publicly available, but since I am still a newby

getting values from a text file (newby)

2009-02-01 Thread vsoler
Hi, My foo.txt file contains the following: 1,house,2,5 2,table,6,7 3,chair,-4,5 ... as seen with notepad. This file was created with the OpenOffice Calc spreadsheet, but since I use comma as the decimal separator for numbers, the last value in each line appears sorrounded by quotes. I would

Re: getting values from a text file (newby)

2009-02-01 Thread vsoler
On 1 feb, 19:02, Stephen Hansen apt.shan...@gmail.com wrote: On Sun, Feb 1, 2009 at 9:24 AM, vsolervicente.so...@gmail.comwrote:Hi, My foo.txt file contains the following: 1,house,2,5 2,table,6,7 3,chair,-4,5 ... as seen with notepad. This file was created with the OpenOffice Calc

Re: getting values from a text file (newby)

2009-02-01 Thread vsoler
On 1 feb, 23:57, John Machin sjmac...@lexicon.net wrote: On Feb 2, 6:18 am, vsoler vicente.so...@gmail.com wrote: r: in the open statement, why do you use 'rb' as 2nd argument? b is supposed to be binary, and my file is text! Because unlike Stephen, r has read the csv manual. Binary mode

Newby: how to transform text into lines of text

2009-01-25 Thread vsoler
Hello, I'va read a text file into variable a a=open('FicheroTexto.txt','r') a.read() a contains all the lines of the text separated by '\n' characters. Now, I want to work with each line separately, without the '\n' character. How can I get variable b as a list of such lines? Thank

Re: Newby: how to transform text into lines of text

2009-01-25 Thread vsoler
On 25 ene, 14:36, Diez B. Roggisch de...@nospam.web.de wrote: vsoler schrieb: Hello, I'va read a text file into variable a      a=open('FicheroTexto.txt','r')      a.read() a contains all the lines of the text separated by '\n' characters. No, it doesn't. a.read() *returns

<    1   2