Re: Class data being zapped by method
- From: Bruno Desthuilliers <onurb@xxxxxxxxxxx>
- Date: Wed, 09 Aug 2006 11:52:21 +0200
Simon Forman wrote:
(snip)
Not that this has anything to do with your actual question, but there
are a number of small details that I noticed while reading your code:
2.) Reading lines from a file is better done like so:
arrLines = open('datafiles/'+filename+'.tabdata').readlines()
Actually, it's better done like so:
fpath = os.path.join('datafiles', filename + ".tabdata")
f = open(fpath)
try:
process_opened_file(f)
finally:
f.close()
.
- Follow-Ups:
- Re: Class data being zapped by method
- From: Sion Arrowsmith
- Re: Class data being zapped by method
- References:
- Class data being zapped by method
- From: arenium
- Re: Class data being zapped by method
- From: Gary Herron
- Re: Class data being zapped by method
- From: Kevin M
- Re: Class data being zapped by method
- From: Simon Forman
- Class data being zapped by method
- Prev by Date: Re: How to reverse tuples in a list?
- Next by Date: Best way to construct an email - attach a html file and send
- Previous by thread: Re: Class data being zapped by method
- Next by thread: Re: Class data being zapped by method
- Index(es):