[python-win32] SystemError: Parent module '__ax_main__' not loaded
Marc-Andre Belzile
Marc-Andre.Belzile at autodesk.com
Tue Aug 10 21:38:05 CEST 2010
Hi,
I'm using the Python ActiveX Scripting engine and I'm trying to set some global variables in the engine global space before parsing some .py files. I use this function to set the variables:
def set_global_vars(fullpath ):
import os
globals()['__path__'] = os.path.dirname( fullpath )
globals()['__file__'] = fullpath
It seems to work with my python installation (py2.6/pywin 212) but some customers of mine have reported an error with this line below (using a similar installation)
from win32com.client import dynamic as D
# ERROR : Traceback (most recent call last):
# File "<Script Block 2>", line 1, in <module>
# from win32com.client import dynamic as D
# SystemError: Parent module '__ax_main__' not loaded
Obviously, if set_global_vars is skipped, the error doesn't show up.
Any ideas why would this error happen ?
thank for your help
-mab
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20100810/36a44a17/attachment.html>
More information about the python-win32
mailing list