Thank you Tim. Your advise is been of great help. I just purchased M. Hammond's "Python Programming on Win32" book. Though a bit old the (1999) still is of great help. I have been able to make simple COM servers so far. However, I have a question regarding the code examples found in his http://starship.python.net/ web site. Are they written in Python 1.x... or Python 2.x? I wonder if there are code examples written for Python 3.x?
Cheers to all in the mailing list. 2015-02-24 13:07 GMT-05:00 Tim Roberts <t...@probo.com>: > Diego Vélez Torres wrote: > > > > I need to make a COM object upon my Python code, so I can call it from > > .NET programs (ie. Visual Basic, VB6). I need the COM object (or DLL) > > to be stand alone, because the target PCs where the final programs are > > going to run won't have Python installed. I know so far that py2exe > > supports this directly: > > http://www.py2exe.org/index.cgi/Py2exeAndCtypesComDllServer > > > > I've tried to make some samples with the given link's instructions, > > but I haven't been lucky. I only got empty 'dist' and 'build' folders. > > I've search for documentation on the web for quite a long time with no > > luck. I realized that I need more information besides the one provided > > by the above's link: > > > > 1. How the Python module that I want to compile must be written? I > > mean, all functions and classes in module will be available for > > the outside code through the COM Object? That module needs > > specific lines of code? > > > > What you are trying to create is a COM server. If you search for > "python COM server", you will find many examples. It does have to be > written in a particular way. You have to identify the functions you > want to be exposed, the registry program ID, and the registry GUID in > specially named class members (_public_methods_, _reg_progid_, > _reg_clsid_). > > I suggest you make the COM part work first. Once you have that working, > then you can dig in to py2exe to make it standalone. > > -- > Tim Roberts, t...@probo.com > Providenza & Boekelheide, Inc. > > _______________________________________________ > python-win32 mailing list > python-win32@python.org > https://mail.python.org/mailman/listinfo/python-win32 > -- Diego Vélez Torres divele...@gmail.com Teléfono: 098 28 57 58 Cuenca, Ecuador
_______________________________________________ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32