[python-win32] MSI installer or zip file for pywin32?
Mark Hammond
skippy.hammond at gmail.com
Thu Apr 15 09:49:16 CEST 2010
On 9/04/2010 5:25 AM, Kevin Horn wrote:
>
>
> On Tue, Apr 6, 2010 at 5:26 PM, Mark Hammond <mhammond at skippinet.com.au
> <mailto:mhammond at skippinet.com.au>> wrote:
>
> On 7/04/2010 6:13 AM, Bill Janssen wrote:
>
> Just for the moment, I think I'll see if I can get things working by
> copying the DLLs into \WINDOWS\System32\, including
> Python26.dll. When
> that's set, I'll see if I can remove that step -- I imagine I'd
> somehow
> need to build a custom version of PythonService.exe, to begin with.
>
>
> Ping me when you get to that point - it is now possible to use
> python.exe + a 'bootstrap' script to host services - it is just that
> I haven't made the transition from pythonservice.exe to a more
> stand-alone environment.
>
> Cheers,
>
> Mark
>
>
> This sounds intriguing...where can I find out more about this? I'm
> apparently unable to figure out the right Google keywords, and I don't
> see anything in the changelog...
This happened quite some years ago now. Back when service support was
first created, there was a pseudo-module named 'servicemanager' which
pythonservice.exe magically exposed (ie, it was "builtin" to
pythonservice.exe). Since then the module has been made a "real" module
*ie, servicemanager.pyd now exists) which exposes everything necessary
to host services - which means that it is possible, although not
actually implemented, that the service could be hosted by python.exe
which uses the service manager module.
The main advantage pythonservice.exe still has though is more robust
error reporting - should things fail in a bad way, pythonservice.exe can
write errors directly to the windows event log (ie, without importing
any python modules to do so). On the other hand, python.exe will be
unable to be so robust - if the environment is so messed up that the
core python modules can't be imported (eg, win32evtlog, ctypes, etc)
there is not much they can do to expose the error in a reasonable way.
This is the reason I've never dropped support for pythonservice.exe and
also the reason I've never bothered to make a real "driver" script for
python.exe - one more thing to support and have people expect to work.
That said though, my experience with services is that it is fairly rare
such a low-level environment error actually occurs, so in most cases,
python.exe could report the same errors just fine....
Hope this helps,
Mark
More information about the python-win32
mailing list