Write 10k integers to a file using struct
Josiah Carlson
jcarlson at uci.edu
Tue Oct 26 16:36:33 EDT 2004
More information about the Python-list mailing list
Tue Oct 26 16:36:33 EDT 2004
- Previous message (by thread): Write 10k integers to a file using struct
- Next message (by thread): Need help getting started with Twisted Matrix.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Thomas <2002 at weholt.org> wrote: > What's the quickest way to write and read 10.000 integer values ( or > more ) to and from a file? Using struct somehow? The example in the > docs shows how to handle to or three arguments, but is the fastest way > to write and read just a simple : > > while data: > f.write(struct.pack(format, integer-value)) > > or is there another, quicker and nicer way to do it???? Look at the array module. - Josiah
- Previous message (by thread): Write 10k integers to a file using struct
- Next message (by thread): Need help getting started with Twisted Matrix.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list