Working with fixed format text db's
Neil Cerutti
horpner at yahoo.com
Fri Jun 8 15:29:08 EDT 2007
On 2007-06-08, Marc 'BlackJack' Rintsch <bj_666 at gmx.net> wrote:
> In <slrnf6iut7.14k.horpner at FIAD06.norwich.edu>, Neil Cerutti wrote:
>
>> new = file("new.dat", "w")
>> if not new:
>> print "Error. Could not open file new.dat for writing."
>> raw_input("Press Return To Exit.")
>> sys.exit(1)
>
> Hey, Python is not C. File objects should *always* be "true".
> An error is handled via exceptions.
Thanks. Update in progress.
--
Neil Cerutti
The doctors X-rayed my head and found nothing. --Dizzy Dean
More information about the Python-list
mailing list