I finally got it working! I would do a victory lap around my apartment
building if I wasn't recovering from a broken ankle.
Excuse my excitement, but this simple script marks a new level of
Python proficiency for me. Thanks to Kent, Bob, Denis, and others who
pointed me in the right directi
galaxywatc...@gmail.com wrote:
After
many more hours of reading and testing, I am still struggling to
finish this simple script, which bear in mind, I already got my
desired results by preprocessing with an awk one-liner.
I am opening a zipped file properly, so I did make some progress, but
After many more hours of reading and testing, I am still struggling to
finish this simple script, which bear in mind, I already got my
desired results by preprocessing with an awk one-liner.
I am opening a zipped file properly, so I did make some progress, but
simply assigning num1 and num2
On Fri, Jan 8, 2010 at 2:24 AM, wrote:
> So how do I
> uncompress zip and gzipped files in Python,
zipfile and gzip
> and how do I force split to only
> evaluate the first two columns?
Use the optional second argument to split():
line.split(',', 2)
> Better yet, can I tell split to not evalu
galaxywatc...@gmail.com dixit:
> I wrote a simple Python script to process a text file, but I had to
> run a shell one liner to get the text file primed for the script. I
> would much rather have the Python script handle the whole task without
> any pre-processing at all. I will show 1) a sm
I wrote a simple Python script to process a text file, but I had to
run a shell one liner to get the text file primed for the script. I
would much rather have the Python script handle the whole task without
any pre-processing at all. I will show 1) a small sample of the text
file, 2) my scr