Diego Vélez Torres
2015-02-24 16:53:17 UTC
Hi everyone out there:
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?
2. py2exe looks for a __init__.py inside the 'dir' where the module I
want to compile is. What's the purpose of the __init__ file? What should
be in it?
3. Are there any specific information about the configuration of the
setup.py? Even though the given link's code example explains something, it
is not clear (at least for me). That's why I got just empty folders as a
result.
4. Are there more examples available?
5. etc.
I'll highly appreciate if you can provide with the most complete
documentation and tutorial available (step by step if possible). Please,
consider that my experience with DLLs and COM objects is practically null.
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?
2. py2exe looks for a __init__.py inside the 'dir' where the module I
want to compile is. What's the purpose of the __init__ file? What should
be in it?
3. Are there any specific information about the configuration of the
setup.py? Even though the given link's code example explains something, it
is not clear (at least for me). That's why I got just empty folders as a
result.
4. Are there more examples available?
5. etc.
I'll highly appreciate if you can provide with the most complete
documentation and tutorial available (step by step if possible). Please,
consider that my experience with DLLs and COM objects is practically null.
--
Diego Vélez Torres
***@gmail.com
Teléfono: 098 28 57 58
Cuenca, Ecuador
Diego Vélez Torres
***@gmail.com
Teléfono: 098 28 57 58
Cuenca, Ecuador