[Tutor] reset password program
Sarma Tangirala
tvssarma.omega9 at gmail.com
Sat Dec 17 01:08:55 CET 2011
> thanks dave,
> just tried writing to file for the first time
>
> def main():
> outfile.write('Hello this is a test')
> outfile.close()
> main()
>
> error, globalname outfile is not defined, do i need to import function to
get this working?
>
>
Fyi, you should check the python docs. They have a good introduction if
this is the first time. Also its a good idea to use a try block incase the
file does not exist and you have to do a bit of error handling.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20111217/65ea566b/attachment.html>
More information about the Tutor
mailing list