* Kent Johnson <[EMAIL PROTECTED]> [070415 20:30]:
> Washakie wrote:
> > Thanks so much! Now another task, associated with this one... what I
> > actually ultimately want is to just pull out several fields from the
> > text file in the zip archive (there is actually only one file).. so, my
> > g
Washakie wrote:
> Thanks so much! Now another task, associated with this one... what I
> actually ultimately want is to just pull out several fields from the
> text file in the zip archive (there is actually only one file).. so, my
> goal is the to create a file that looks like:
>
> t[0], x[0],
Thanks so much! Now another task, associated with this one... what I
actually ultimately want is to just pull out several fields from the text
file in the zip archive (there is actually only one file).. so, my goal is
the to create a file that looks like:
t[0], x[0], y[0]
t[1], x[1], y[1]
t[2], x
John W wrote:
> Kent and Alan: better?
> .j
>
> import zipfile
> import os
> import pylab as P
> iFile = raw_input("Which file to process?")
>
> def openarchive(filename):
> """ open the cmet archive and read contents of file into memory """
> z = zipfile.ZipFile(filename, "r")
> for
* Washakie Wyoming <[EMAIL PROTECTED]> [070415 14:25]:
> Thank you both! That seems to make my code much more clear... I thought
> it was foolish writing files, but I just couldn't determine how to
> parse the data!
>
> Kent, one thing, regarding:
> x = []
> t = []
> for l
Kent and Alan: better?
.j
import zipfile
import os
import pylab as P
iFile = raw_input("Which file to process?")
def openarchive(filename):
""" open the cmet archive and read contents of file into memory """
z = zipfile.ZipFile(filename, "r")
for filename in z.namelist():
print f
Thank you both! That seems to make my code much more clear... I thought
it was foolish writing files, but I just couldn't determine how to
parse the data!
Kent, one thing, regarding:
x = []
t = []
for l in data[stind:-1]:
l = l.split() # Split on whitespace
Washakie Wyoming wrote:
> Greetings all!
>
> I'm including here a first python program! Very nice. It's written to
> read in a text file which resides in a .zip archive, extract two fields
> and plot them. It uses some bits from pylab for the plotting.
>
> I'm writing to ask for ways to improve i
"Washakie Wyoming" <[EMAIL PROTECTED]> wrote
> I'm writing to ask for ways to improve it. I feel like the
> writing and reading from 'jnk' files is definitely a hack!
Yup!
I'm not sure why you do it, at least the first time.
You read the file into memory, why not just process it there?
You can s