February 1st, 2005, 12:17 PM
create a txt document and write to it.
does anybody know a function or something that will create a .txt document in the same directory as the .exe file(using py2exe) you run and then add some text to it i can specify myself?
February 1st, 2005, 02:25 PM
Look into python's file I/O routines. Specifically open() and the file object.
txtfile = open("hello.txt", "w")
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
"Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne
"I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo
February 1st, 2005, 02:26 PM
When you compile a Python program with py2exe is will work just like the Python program so all you need to do is to write a program that writes asks the user for input and write it to a file. There is a new article on Devshed that you might be interested in:
Hope this helps,