Python code persistance

Andrés ahindra at hotmail.com
Thu Aug 29 18:20:42 EDT 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