Python 3.5 amd64 and win32service
eryk sun
eryksun at gmail.com
Tue Oct 4 09:30:16 EDT 2016
On Tue, Oct 4, 2016 at 7:33 AM, Nagy László Zsolt <gandalf at shopzeus.com> wrote:
>
>>> Is it possible to write a win32 service with 64 bit python 3.5? The
>>> pywin32 package does exist on 3.5 64bit, but missing some modules:
>> Try pip installing the "pypiwin32" package.
> That worked, thanks.
>
> Do you have an explanation why to official build (
> https://sourceforge.net/projects/pywin32/files/pywin32/ ) is missing
> these module?
Not off hand.
> After installing this package, the "service start" operation throws "The
> Service Did Not Respond To The Start Or Control Request In A Timely
> Fashion". error code 1053
Run the post-install script (in the Scripts folder):
"pywin32_postinstall.py -install". First edit the script to replace
references to "pywin32_system32" with "pypiwin32_system32", which
reflects the changed directory name in the wheel package. Running this
script should copy over pywintypes35.dll and pythoncom35.dll to the
System32 directory. pywintypes35.dll is required by PythonService.exe.
> def main(self):
> self.ReportServiceStatus(win32service.SERVICE_RUNNING)
> while not self.stop_requested.is_set():
> time.sleep(1) # So something useful here
Why don't you use the Windows Event (hWaitStop) with
WaitForSingleObject instead of an additional threading.Event?
More information about the Python-list
mailing list