Page 1 of 1

txt file writing

Posted: July 16th, 2017, 2:57 pm
by wwei23
How do I get Python to write to a txt file?

Re: txt file writing

Posted: July 16th, 2017, 3:21 pm
by Sokwe
Try googling "How do I get Python to write to a txt file?"

Re: txt file writing

Posted: July 16th, 2017, 7:30 pm
by Saka
F = open("Blah.txt","w")
F.write("Uvuvwevwevwe")

If I remember correctly

Re: txt file writing

Posted: July 16th, 2017, 8:14 pm
by drc
Saka wrote:Uvuvwevwevwe
Wow that's a really obscure reference(?), nice job.

Re: txt file writing

Posted: July 16th, 2017, 9:56 pm
by dvgrn
Golly's shift.py/lua and goto.py/lua both remember previously used numbers by reading and writing to specific text files in Golly's data folder. Just right-click on those scripts for a reminder of how the syntax works.

Re: txt file writing

Posted: July 17th, 2017, 5:02 am
by Saka
drc wrote:
Saka wrote:Uvuvwevwevwe
Wow that's a really obscure reference(?), nice job.
When I look for a text spacefiller I always get what comes out fresh from the lump of dead stuff that makes me living.

Re: txt file writing

Posted: July 17th, 2017, 6:54 am
by Naszvadi
This topic is a candidate for being moved to ../forums/viewforum.php?f=12 a.k.a. Sandbox.