Help writing to file
Stan Cook
scook at elp.rr.com
Wed Jul 23 23:33:11 EDT 2003
I'm trying to have my program write to a log file. I have the idea, but I'm
getting an error and don't understand why.
File "D:\AetInstall\aet.py", line 201, in load_progs
_log.write(string.ljust( _serv, 25))
AttributeError: 'str' object has no attribute 'write'
I get the above message from this section of code:
for s in _image:
_serv = s
print _serv
_ErrorLevel=map_server(_serv)
_log.write(string.ljust( _serv, 25))
_image is a list containing server names.
Any help would be appreciated.
Thanks,
Stan
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.501 / Virus Database: 299 - Release Date: 7/14/03
More information about the Python-list
mailing list