[python-win32] Context menu handler as executable
Gertjan Klein
gklein at xs4all.nl
Tue Aug 9 09:58:39 EDT 2016
Tim Roberts wrote:
> On Aug 9, 2016, at 2:21 AM, Gertjan Klein <gklein at xs4all.nl> wrote:
>>
>> Thanks! That helps. As far as I can tell, py2exe is the only executable
>> builder that can create a COM server DLL, so I'm trying to find out how
>> to request it to do so. There is an example here:
>>
>> http://www.py2exe.org/index.cgi/Py2exeAndWin32com
>>
>> However, this talks about modules and packages; I have one single file.
>> Could you (or anyone) steer me in the right direction?
>
> Well, your source code might only be one file, but you're using many modules from the standard library (win32com and os, if nothing else). Those, and the modules they all need, all have to be included.
>
> Have you actually tried the examples on the pages you quoted?
Again I seem to fail to convey what went wrong... Yes, I have
(obviously) tried that, in various combinations. Apparently, what I
entered for the various parameters is not what I should enter there.
The "modules and packages" I mentioned are those in the example code,
and refer to my source code -- somewhere I have to enter what I want
converted to a DLL. I don't know how to do that. Specifically, for my
one-file program:
- In my_com_server_target, what to enter for modules
- In the call to setup, what to enter for packages
What happens for everything I tried is:
running py2exe
running build_py
1 missing Modules
------------------
? readline imported from cmd, code, pdb
Readline missing is expected on Windows. I see code on the 'net with
that same message where setup continues to "creating build", so
apparently this is indeed not a fatal error.
After this, an empty dist directory and and a build\lib directory with
ctmx.py is created. That's it. No DLL.
I get the impression that what I'm after is blindingly obvious for those
that know how to do it. It is not to me; please accept that I tried to
the best of my abilities before posting here.
Regards,
Gertjan.
More information about the python-win32
mailing list