[Newbie] - First Help

Steffen Ries steffen.ries at sympatico.ca
Sun Nov 5 13:51:17 CET 2000


"Super Bolo" <rlboloNOSPAM at libero.it> writes:

> here you will find my code of a software that should ask for Name and
> Telephone Number and writes them to a file (i know that in this way it will
> erase the file content each time but that's not the problem now).
> The problem is that i can't get the interpreter to write both name and
> number... why?? The error is "read-only carachter"... what's wrong??? Please
> help.

...
>                 file.write(nome , numero)

write() takes only one parameter, which is a string it's writing to
the file.

You may want to use file.write("%s, %s" % (nome, numero)) instead.

hth,
/steffen
-- 
steffen.ries at sympatico.ca	<> Gravity is a myth -- the Earth sucks!



More information about the Python-list mailing list