Hi, all, i mean to convert 'c\000\000\000\000\001\000\000\000s\017\000\000\00 > 0\177\000\000\177\002\000d\000\000GHd\001\000S(\00 > 2\000\000\000s\005\000\000\000helloN(\000\000\000\ > 000(\000\000\000\000s\010\000\000\000<script>s\001' to the orig script """ print 'hello' """
Thanks "leo" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > following is the python scripts: > import marshal > script = """ > print 'hello' > """ > code = compile(script, "<script>", "exec") > data = marshal.dumps(code) > print repr(data) > the result:'c\000\000\000\000\001\000\000\000s\017\000\000\00 > 0\177\000\000\177\002\000d\000\000GHd\001\000S(\00 > 2\000\000\000s\005\000\000\000helloN(\000\000\000\ > 000(\000\000\000\000s\010\000\000\000<script>s\001 > \000\000\000?\002\000s\000\000\000\000'how to convert the result code to > orig script """print 'hello'"""thanks > > -- http://mail.python.org/mailman/listinfo/python-list