[Tutor] Language truce
alan.gauld@bt.com
alan.gauld@bt.com
Fri, 29 Jun 2001 11:42:06 +0100
> Ah, yes. I should have realized, we just started going over classes
> in my java course last night.
Classes are the equivalent.
> easy. But, the file-reading and data storage parts are more
> interesting. In C, I would just use a struct and a linked list and
> write/read the structs to/from a binary file -- I've done all that
> type of stuff before.
In Python the nearest equivalent is to use the pickle module
which looks after writing objects to files. There is a struct
module too but that involves much more work and seems best
suited to reading/writing binary dfiles that must be shared
with non python apps.
> A class is probably the way to go. Might be a little while before I
> get a handle on that, though.
You can try my tuor page ;-)
http://www.crosswinds.net/~agauld/tutclass.htm
Alan g