January 18th, 2004, 12:43 PM
Compiling COM server with Py2exe
Hi all, I've found wh2fax an Hylafax client which uses a COM server written in Python, which comes as .py file (exactly 2 files hfaxcom.py and hfaxlib.py). Now I want to use that COM server with other programs and to ease distribution I'd like to compile it with py2exe.
Right now I'm getting errors like:
I'm on win2k with python22 and a recent py2exe.
setup.py contains the following
Has anyone already accomplished this? Can you help me?
I know absolutely nothing about python, just need the com server
Thanks in advance.
January 19th, 2004, 06:56 AM
I haven't tested this but I looked at the code....
The pywintypes module actually replaces references to itself with a link to a dll called pywintypesXX.dll Where XX is the python version. Unless Py2exe handles this as a special case it will not know how to include the dll.
I suggest the solution will be to either manually copy pywintypes22.dll to the directory of your program or you can include it in the list of files of your py2exe script.
You never know..
data_files = [(r"location_of_dll",[pywintypes22.dll,])]
Last edited by Grim Archon; January 19th, 2004 at 06:59 AM.
January 19th, 2004, 11:25 AM
I'try and let you know the results.
Thank you very much!!!!