Message72127
The example Demo/embed/importexc.c crashes, because Py_NewInterpreter
cannot reimport builtins and sys modules. This problem seems important
for embedding applications like mod_python, for example.
(the "import exceptions" statement does not work with python 3.0, but
replacing with e.g. "import types" does not change anything: the
interpreter is not correctly renewed)
I tried to put "-1" in the m_size structure of these modules, and they
seem to import correctly. However, "builtins" comes with its original
dictionary - without the standard exceptions.
I think that these modules should be made re-importable, with specific
functions.
Maybe two related problems:
- once you've done
del sys.modules['sys']
it's not possible to get it back, "import sys" raises an error...
- the usual trick to call sys.setdefaultencoding will not work, since it
needs to "imp.reload(sys)" |
|
Date |
User |
Action |
Args |
2008-08-29 12:11:10 | amaury.forgeotdarc | set | recipients:
+ amaury.forgeotdarc, loewis |
2008-08-29 12:11:10 | amaury.forgeotdarc | set | messageid: <1220011870.63.0.171875917127.issue3723@psf.upfronthosting.co.za> |
2008-08-29 12:11:09 | amaury.forgeotdarc | link | issue3723 messages |
2008-08-29 12:11:09 | amaury.forgeotdarc | create | |
|