Thanks, everyone for replying so promptly. I got it to work the way I
intended, and have some ideas for how to make it much cleaner.
- Lisa
--
http://mail.python.org/mailman/listinfo/python-list
I'm not sure if this will /solve/ your problem, but it's
something I noticed...
> UnitList = open('/Python25/working/FacList.txt', 'r')
> RawData = open('/Python25/working/data.txt', 'r')
Here, you open RawData once...
> Output = open('/Python25/working/output.txt', 'a')
>
> def PullHourlyData
[EMAIL PROTECTED] wrote:
> RawData = open('/Python25/working/data.txt', 'r')
You open this file only once. The first time in here:
> def PullHourlyData(filename, facility, unit):
> for line in filename:
reads all of the file - nothing left for the other function calls!
A better way wou
[EMAIL PROTECTED] wrote:
> thats easy enough to solve
>
> """test text.py
> for playing around with my text editing task
> """
>
> UnitList = open('/Python25/working/FacList.txt', 'r')
> RawData = open('/Python25/working/data.txt', 'r')
> Output = open('/Python25/working/output.txt', 'a')
>
> de
thats easy enough to solve
"""test text.py
for playing around with my text editing task
"""
UnitList = open('/Python25/working/FacList.txt', 'r')
RawData = open('/Python25/working/data.txt', 'r')
Output = open('/Python25/working/output.txt', 'a')
def PullHourlyData(filename, facility, unit):
[EMAIL PROTECTED] wrote:
> Hi,
> Any ideas of what could be the problem?
>
Hard to say without seeing your code.
Jordan Greenberg
--
Posted via a free Usenet account from http://www.teranews.com
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I've just started programming in python, and have run into an
unexpected problem. I am using python to pull text data from some csv
files. I have one file that has the important identifiers (name, etc)
and other files with lots of other data. I wrote a function that takes
the file name and