Hi, i'm having quite a problem with my Internet Explorer Button script. As i
was trying to rush things up i took the pywin32 CVS example and added some
functions.
It runs pretty well on the interpreter but when i compile as a com_server or
a console on py2exe it just dont work.
I debugged(with microsoft debbuging tool) the IEXPLORE.EXE process when
using the script and it showed calling all the necessary modules to run it
like python interpreter but when i try the compiled version, nothing
happens, no modules and exceptions.
Please help me, the button works so well before being "compiled"... :)
[code]
import time
import sys
if len(sys.argv) == 1:
sys.argv.append("py2exe")
# ModuleFinder can't handle runtime changes to __path__, but win32com uses
them
try:
# if this doesn't work, try import modulefinder
import py2exe.mf as modulefinder
import win32com
import pythoncom
for p in win32com.__path__[1:]:
modulefinder.AddPackagePath("win32com", p)
modulefinder.AddPackagePath("pythoncom", p)
for extra in ["win32com.axcontrol"]: #,"win32com.mapi"
__import__(extra)
m = sys.modules[extra]
for p in m.__path__[1:]:
modulefinder.AddPackagePath(extra, p)
except ImportError:
# no build path setup, no worries.
print "no build path setup, no worries."
pass
from distutils.core import setup
import py2exe
# Don't pull in all this MFC stuff used by the makepy UI.
py2exe_options = dict(excludes="pywin,pywin.dialogs,pywin.dialogs.list
,win32ui")
setup(name="win32com 'interp' sample",
com_server=["iebutton"],
options = dict(py2exe=py2exe_options)
)
|