[Tutor] lists and strings

2005-11-08 Thread Mike Haft
Hello, I've been working on a problem and have now sorted most of it (thanks to some help from the list). All the ways of writing data to a file I know keep telling me that lists can't be written to the file. I'm trying to convert data from one set of files into files of a different format.

[Tutor] File IO and writing lists

2005-11-04 Thread Mike Haft
Carroll, Barry [EMAIL PROTECTED] wrote: Second, your current logic is assembling the data from each line into a string. Is that what you want? I'm guessing you want to extract the three fields into a three element list. If so, you need to turn the three strings (fields[1], fields[2] and

Re: [Tutor] File IO

2005-11-03 Thread Mike Haft
I did that and got this: Here goes Enter filename: Name:LAU73M.MET Line too short Monthly Weather Data, LAU73M.MET, converted from: Line too short BAD LAUCHSTAEDT; DAILY METEOROLOGICAL DATA FOR 01/01/1973-31/12/1973 Line too short

[Tutor] File IO Help again

2005-10-27 Thread Mike Haft
Apologies for not making things clearer last time. My specific problems are: why can I not get the readline() or readlines() functions to work, I'm told they are not defined whenever I try. Also the following: if line[:1] == 1: collects data from month 1, 10, 11, and 12. How do I make the

[Tutor] File IO help

2005-10-26 Thread Mike Haft
of the list but I haven't found anything that says READ THIS BEFORE POSTING! on it to tell me otherwise. Thanks in advance Mike Haft ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor