python compiled code ofuscation

Jesus Cea Avion jcea at argo.es
Tue Aug 1 14:16:58 EDT 2000


> The first argument to exec can be a string or a compile'd string.

You can really use compiled strings?   :-?

>>> import new
>>> a=open("gestor_cache.pyc").read()
>>> modname=new.module("gestor_cache")
>>> modname
<module 'gestor_cache' (built-in)>
>>> exec(a,modname.__dict__)
Traceback (innermost last):
  File "<stdin>", line 1, in ?
ValueError: embedded '\0' in exec string

-- 
Jesus Cea Avion                         _/_/      _/_/_/        _/_/_/
jcea at argo.es http://www.argo.es/~jcea/ _/_/    _/_/  _/_/    _/_/  _/_/
                                      _/_/    _/_/          _/_/_/_/_/
PGP Key Available at KeyServ   _/_/  _/_/    _/_/          _/_/  _/_/
"Things are not so easy"      _/_/  _/_/    _/_/  _/_/    _/_/  _/_/
"My name is Dump, Core Dump"   _/_/_/        _/_/_/      _/_/  _/_/
"El amor es poner tu felicidad en la felicidad de otro" - Leibniz



More information about the Python-list mailing list