A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-March/021031.html below:

[Python-Dev] Python interpreter crash.

[Python-Dev] Python interpreter crash. [Python-Dev] Python interpreter crash.Guido van Rossum guido@python.org
Tue, 12 Mar 2002 21:15:03 -0500
> I was searching for a way to construct a new module
> from it's file's compiled bytecode (just read() the "*.pyc" file),

import marshal, imp
f = open("foo.pyc")
f.seek(8)
code = marshal.load(f)
f.close()
foo = imp.new_module("foo")
exec code in foo.__dict__

--Guido van Rossum (home page: http://www.python.org/~guido/)



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4