ActiveScripting: import email => no module named _codecs
Mark Hammond
mhammond at skippinet.com.au
Wed Apr 30 18:01:16 EDT 2003
My guess is that you are running this from inside IE. IE executes
Python code in a restricted environment. My guess is that this
restricted environment is preventing the Unicode codecs from being imported.
You could try to fix this by opening
win32comext\axscript\client\framework.py and locating the line:
ok_builtin_modules = rexec.RExec.ok_builtin_modules + ('win32trace',)
Change this to:
ok_builtin_modules = rexec.RExec.ok_builtin_modules +
('win32trace','_codecs')
And see if that helps. Let me know either way.
Mark.
vadim wrote:
> I am doing rather simple thing after installing win32com
> extensions (IE):
>
> <script language="Python" >
> import email.Parser
> </script>
>
> and getting following error:
> ...
> File "<ScriptBlock> ", line 2, in ?
> import email.Parser
> SystemError: Failed to load the builtin codecs: No module named _codecs
>
> Does anyone could help what it means?
More information about the Python-list
mailing list