Writing Files

L

Lucas Raab

What is the best way to go about writing to files?? Whenever I insert a
statement to write results to a file there's nothing in it. Any
suggestions??

TIA
 
?

=?ISO-8859-1?Q?Bernard_Delm=E9e?=

Which statement did you try? Here's a one-liner that works:

file( 'mydata.txt', 'w' ).write( "the python sleeps tonight" )
 
F

Francis Avila

Lucas Raab wrote in message ...
What is the best way to go about writing to files?? Whenever I insert a
statement to write results to a file there's nothing in it. Any
suggestions??


Don't forget to close and/or flush your file....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,175
Messages
2,570,942
Members
47,491
Latest member
mohitk

Latest Threads

Top