[Tutor] Integer to String possible????
Daniel D. Laskey
Sun, 20 Aug 2000 22:55:38 -0400
I've had the same problem. I tried it and it works.
# create and empty data_file
# open the data file called data_file
data_file = raw_input('File to open? ')
in_file = open(data_file,"r")
# read the in_file
text = in_file.read()
# print the file to the screen
# create the file to export the data to
# you need the double or single quotes around the name to save the file
out_file = open("new_file.txt","w+")
# write the new file you created to the file "new_file.txt"
Keep working at it and sending in your questions. It helps me, too.
From: Albert Antiquera [SMTP:email@example.com]
Sent: Sunday, August 20, 2000 3:27 PM
Subject: [Tutor] Integer to String possible????
From my last question I couldn't save to a txt file. I had some
improvements and I could save part of the result (strings) in to the text
file; but now I couldn't include the integer part because the
".writelines()"method doesn't like it. Is there a way to get around
this?Possibly a way to convert an Integer to a String?
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
Tutor maillist - Tutor@python.org