3 small queries

graham.matthews@maths.anu.edu.au
26 Jan 1995 23:21:31 GMT

I was wondering if anyone could answer the following,

a) is the read() call on a file 'f' buffered? I am wanting to do the
equivalent of fgetc(f) to get a single character from a file object.
One way to do this in Python is to do f.read(1). For obvious speed
reasons I am hoping read() is buffered ...

b) is there any way to force the python interpreter to delete all
the objects in memory on an exit?

c) can the "object-base" (the set of objects in memory) be saved to
a file in some easy fashion, and then be read back in later? I have
a large object-base that gets updated by some commands, and then I
want to essentially save the state of the interpreter so that I can
look at it later. Just to complicate things I might want to look at
it on a different machine (I might mail the state to someone else).

graham

--
                      Je suis pour le communisme
                      Je suis pour le socialisme
                      Je suis pour le capitalisme
                     Parce que je suis opportuniste