How to write integers to a file?

Steven Sartorius ssartor at bellatlantic.net
Fri Feb 9 08:06:36 EST 2001


I'm trying to write a series of whitespace delimited integers to a file.
The 'write' method only accepts strings and using arrays produces binary
data when I open the file with less.  What I want is somehting like
printf for python.  Is there any easy way to do this?  (there must
be...this is python!)

Any help much appreciated...

Thanks,

Steve Sartorius



More information about the Python-list mailing list