[Python-Dev] save()/load() (original) (raw)

Phillip J. Eby pje at telecommunity.com
Mon Dec 1 17:26:47 EST 2003


At 04:10 PM 12/1/03 -0600, Skip Montanaro wrote:

def load(): execfile(sessionfile, sys.getframe(-1).fglobals) print >> sys.stderr, "loaded session from", sessionfile

What does getframe with a negative number do? I've only ever used positive numbers when calling getframe. I think maybe you want 1 here, not -1.



More information about the Python-Dev mailing list