Python code persistance

Andrés ahindra at hotmail.com
Fri Aug 30 00:20:42 CEST 2002


> How do you explain this, then?
> --SamB
> 
> # Don't worry, I won't nuke your system!
> import marshal, new
> 
> new.function(marshal.loads('''eJxLZgACRgZmhmJ+IKOekaGeiSGFkcHdI4WBIViDCS
> jmV8wHJD1Sc3LyFXwTi4ozEnMUNUC60IhidiBhU1ySkplnV8wIZCcyMhSDDGBmBADk7w6R'''
> .decode('base64').decode('zlib')), {})()

i refer clearly to a "code object" and not a function (different
things according python doc) ,besides in your example you still need
the "new" module and some other functions to do the job.



More information about the Python-list mailing list