Re: help I'm getting delimited

2008-12-18 Thread J. Cliff Dyer
On Wed, 2008-12-17 at 06:28 -0800, aka wrote: > Hi John, thanks. > You're right, I didn't past the method header because I thought it > didn't matter when the input filename is hardcoded. > The try/except isn't very helpful indeed so I commented it out. > You're right I wrongly referred to the Uni

Re: help I'm getting delimited

2008-12-18 Thread aka
> On Dec 18, 3:15 am, aka wrote: > Do you mean that this file was created by whatever.UnicodeWriter? If > so, did you just now discover this information? > How do you know that "the UnicodeWriter is functioning perfectly"? > What does "functioning perfectly mean to you"? In particular, what > enco

Re: help I'm getting delimited

2008-12-18 Thread aka
On 18 dec, 00:06, John Machin wrote: - Tekst uit oorspronkelijk bericht niet weergeven - - Tekst uit oorspronkelijk bericht weergeven - > On Dec 18, 3:15 am, aka wrote: > Do you mean that this file was created by whatever.UnicodeWriter? If > so, did you just now discover this information? >

Re: help I'm getting delimited

2008-12-18 Thread aka
On 18 dec, 00:06, John Machin wrote: > On Dec 18, 3:15 am, aka wrote: > > Do you mean that this file was created by whatever.UnicodeWriter? If > so, did you just now discover this information? > > How do you know that "the UnicodeWriter is functioning perfectly"? > What does "functioning perfectl

Re: help I'm getting delimited

2008-12-17 Thread John Machin
On Dec 18, 3:15 am, aka wrote: > John, this is the actual code I ran in TurboGears which is a Python > framework. It's not complete -- the change in indentation would have caused a SyntaxError. If (as you appear to assert) the problem is in the csv module, then create a small stand-alone no-Turb

Re: help I'm getting delimited

2008-12-17 Thread aka
John, this is the actual code I ran in TurboGears which is a Python framework. I should have left away the import statements. Trust me, the problem isn't in there because the UnicodeWriter is functioning perfectly. I did allready sanitate the csv file to these four lines in Notepad so there isn't a

Re: help I'm getting delimited

2008-12-17 Thread rdmurray
Quoth John Machin : > On Dec 18, 1:28 am, aka wrote: > > @expose(allow_json=True) > > Means what? Does what? > Does the problem still happen without that? Means what he's posting is not a standalone script :) He says it's part of his turbogears ap. @expose says that this method is callabl

Re: help I'm getting delimited

2008-12-17 Thread John Machin
On Dec 18, 1:28 am, aka wrote: > Hi John, thanks. > You're right, I didn't past the method header because I thought it > didn't matter when the input filename is hardcoded. > The try/except isn't very helpful indeed so I commented it out. > You're right I wrongly referred to the UnicodeReader > cl

Re: help I'm getting delimited

2008-12-17 Thread aka
Hi John, thanks. You're right, I didn't past the method header because I thought it didn't matter when the input filename is hardcoded. The try/except isn't very helpful indeed so I commented it out. You're right I wrongly referred to the UnicodeReader class in my first post because that's ultimate

Re: help I'm getting delimited

2008-12-17 Thread aka
Hi John, thanks. You're right, I didn't past the method header because I thought it didn't matter when the input filename is hardcoded. The try/except isn't very helpful indeed so I commented it out. You're right I wrongly referred to the UnicodeReader class in my first post because that's ultimate

Re: help I'm getting delimited

2008-12-17 Thread John Machin
On Dec 17, 9:39 pm, aka wrote: > Due to being in a hurry I didn't paste correctly (sorry). > > The intention is to put values of column 1 ("id") in the roles list, > therefore appending within the loop, to fill a session var. > > The complete code is: It's *not* complete. It's missing "import csv

Re: help I'm getting delimited

2008-12-17 Thread aka
Due to being in a hurry I didn't paste correctly (sorry). The intention is to put values of column 1 ("id") in the roles list, therefore appending within the loop, to fill a session var. The complete code is: roles = [] inp = 'C:/temp/test.csv' try: fp = open(inp, 'rb') reader = csv.read

Re: help I'm getting delimited

2008-12-17 Thread aka
Due to being in a hurry I didn't paste correctly (sorry). The intention is to parse a csv file and (ultimately) put values of column 1 ("id") in a list (so I need to append in the loop) that will be used to fill a session var. The complete code is: roles = [] inp = 'C:/temp/test.csv' try: fp =

Re: help I'm getting delimited

2008-12-17 Thread aka
Due to being in a hurry I didn't paste correctly so I lost the try clause (sorry). The intention is to parse a csv file and (ultimately) put values of column 1 ("id") in a list (so I need to append in the loop) that will be used to fill a session var. The complete code is: roles = [] inp = 'C:/tem

Re: help I'm getting delimited

2008-12-16 Thread MRAB
Paul Watson wrote: On Tue, 2008-12-16 at 08:26 -0800, aka wrote: Hi, I'm going nuts over the csv.reader and UnicodeReader class. Somehow I can't get this method working which is supposed to read a csv file which name is inputted but here now hardcoded. What I need for now is that the string vers

Re: help I'm getting delimited

2008-12-16 Thread Paul Watson
On Tue, 2008-12-16 at 08:26 -0800, aka wrote: > Hi, I'm going nuts over the csv.reader and UnicodeReader class. > Somehow I can't get this method working which is supposed to read a > csv file which name is inputted but here now hardcoded. What I need > for now is that the string version of the lis

help I'm getting delimited

2008-12-16 Thread aka
Hi, I'm going nuts over the csv.reader and UnicodeReader class. Somehow I can't get this method working which is supposed to read a csv file which name is inputted but here now hardcoded. What I need for now is that the string version of the list is put out for control. Later on I will only need to