"alex goretoy" wrote:
>
>This line doesn't work for me. bufferp is empty afterwards.
>
>self.bufferp= [dict(zip(header,line)) for line in reader]
>
>needs to be this
>self.bufferp= [dict(zip(header,line)) for line in self.buffer]
Yes, when I was writing this, I started out eliminating self.buffer
This line doesn't work for me. bufferp is empty afterwards.
self.bufferp= [dict(zip(header,line)) for line in reader]
needs to be this
self.bufferp= [dict(zip(header,line)) for line in self.buffer]
after reading from the reader, it becomes empty. Figured maybe someone would
find this info useful
Tim, Thank you for your suggestions that you made. I will modify my class to
what you said. I will also remove find_and_replace. seeing as I won't use it
anywhere else. I think I put it there for some test and forgot to delete it.
I was actually deleting the header outside of the class. This works
"alex goretoy" wrote:
>
>class parsercsvy(object):
>"""Return a line from a csv file or total amount of lines"""
>def __init__(self,file_name=""):
>self.func_me_color="white_on_black"
>self.soc=stdout_colours.stdout_colors()
>self.soc.me_him(['ENTER:',__name__],self
How would I change this to work with numpy: (Would it be more feasible for
storing big files? 300-30,000 records)
for row in reader:
self.buffer.append(row)
s,a=[],{}
for j in range(len(self.buffer[0])):
a[self.bu
I might as well add a UnicodeReader and UnicodeWriter and support for
passing delimiter in from other classes. At the same time. Anyone have a
good csv class I can pick thru? I'm planning on posting my mysql adn curl
classes that I use in my projects I just want to make them better and have
less e
It's main concern is to grab the file into the buffer for use in other
classes. The self.soc.me_him is just so I know when its ENTERING or EXITING
in that function when I run it in terminal. It's prints it in color. My main
concern right now is to add error handling. I'm still learning how to use
a
En Sat, 27 Dec 2008 11:02:13 -0200, Gary M. Josack
escribió:
alex goretoy wrote:
I know it's messy with all those self.soc.* functions, but it works in
one of my current project. I just want to make it more pythonic I also
want to add capability for makeing csv file if I give it input lik
On Sat, Dec 27, 2008 at 5:02 AM, Gary M. Josack wrote:
> alex goretoy wrote:
>>
>> I know it's messy with all those self.soc.* functions, but it works in one
>> of my current project. I just want to make it more pythonic I also want to
>> add capability for makeing csv file if I give it input like
alex goretoy wrote:
I know it's messy with all those self.soc.* functions, but it works in
one of my current project. I just want to make it more pythonic I also
want to add capability for makeing csv file if I give it input like:
1234,something nice, hey this is something nice
2468,something e
I know it's messy with all those self.soc.* functions, but it works in one
of my current project. I just want to make it more pythonic I also want to
add capability for makeing csv file if I give it input like:
1234,something nice, hey this is something nice
2468,something else, something else
On
Hello All,
I have this class that I use in one of my projects. I know it's missing
functionality and some things could have been done differently. Can you ehlp
me make this class better? What can I do to make it more resistant to error?
You can find the stdout_colours class on Google if you want i
12 matches
Mail list logo