Re: win32serviceutil won't start
On Nov 28, 1:59 pm, Nikola Skoric <[EMAIL PROTECTED]> wrote: > Dana Mon, 26 Nov 2007 08:50:23 -0800 (PST), > [EMAIL PROTECTED] <[EMAIL PROTECTED]> kaze: > > > Sorry I didn't reply sooner. If you're creating a service based on a > > Python file, check out the following links in addition to the book > > Wolfgang mentioned: > > >http://agiletesting.blogspot.com/2005/09/running-python-script-as-win... > >http://www.thescripts.com/forum/thread595660.html > >http://essiene.blogspot.com/2005/04/python-windows-services.html > > > That should get you started. Hope it helps! > > Huh. Thank you guys a lot. I took a glance (albeit a rather long one) > and decided that my users will have to install cygwin if they want to > use my script. Service handling is just a bit to complicated (after > creating UNIX daemon with 2 consecutive forks), and I'm not going to > be paid for this :-D > > -- > "Now the storm has passed over me > I'm left to drift on a dead calm sea > And watch her forever through the cracks in the beams > Nailed across the doorways of the bedrooms of my dreams" Yeah...a lot of things on Windows is just too complicated for its own good. Every now and again you'll stumble across something that's pretty elegant though. Mike -- http://mail.python.org/mailman/listinfo/python-list
Re: win32serviceutil won't start
Dana Mon, 26 Nov 2007 08:50:23 -0800 (PST), [EMAIL PROTECTED] <[EMAIL PROTECTED]> kaze: > Sorry I didn't reply sooner. If you're creating a service based on a > Python file, check out the following links in addition to the book > Wolfgang mentioned: > > http://agiletesting.blogspot.com/2005/09/running-python-script-as-windows.html > http://www.thescripts.com/forum/thread595660.html > http://essiene.blogspot.com/2005/04/python-windows-services.html > > That should get you started. Hope it helps! Huh. Thank you guys a lot. I took a glance (albeit a rather long one) and decided that my users will have to install cygwin if they want to use my script. Service handling is just a bit to complicated (after creating UNIX daemon with 2 consecutive forks), and I'm not going to be paid for this :-D -- "Now the storm has passed over me I'm left to drift on a dead calm sea And watch her forever through the cracks in the beams Nailed across the doorways of the bedrooms of my dreams" -- http://mail.python.org/mailman/listinfo/python-list
Re: win32serviceutil won't start
On Nov 25, 5:11 pm, Nikola Skoric <[EMAIL PROTECTED]> wrote: > Dana Sun, 25 Nov 2007 13:52:35 -0800 (PST), > [EMAIL PROTECTED] <[EMAIL PROTECTED]> kaze: > > > Looks like Microsoft thinks you mis-spelled it. > > >http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/w... > > > I would check and see if that service is installed on your PC. You can > > go to Start --> Run and type services.msc > > > Scroll through there and see if your service is listed. You might > > check to see if you can enable/disable it via that console as well. > > Seems like I misunderstood Windows services (I'm porting UNIX daemon > to Windows so I'm thinking in UNIX terms). I didn't know I have to > _install_ a service before I _start_ it. How do I install a service? > > -- > "Now the storm has passed over me > I'm left to drift on a dead calm sea > And watch her forever through the cracks in the beams > Nailed across the doorways of the bedrooms of my dreams" Sorry I didn't reply sooner. If you're creating a service based on a Python file, check out the following links in addition to the book Wolfgang mentioned: http://agiletesting.blogspot.com/2005/09/running-python-script-as-windows.html http://www.thescripts.com/forum/thread595660.html http://essiene.blogspot.com/2005/04/python-windows-services.html That should get you started. Hope it helps! Mike -- http://mail.python.org/mailman/listinfo/python-list
Re: win32serviceutil won't start
Dana Sun, 25 Nov 2007 13:52:35 -0800 (PST), [EMAIL PROTECTED] <[EMAIL PROTECTED]> kaze: > Looks like Microsoft thinks you mis-spelled it. > > http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/w2000Msgs/3310.mspx?mfr=true > > I would check and see if that service is installed on your PC. You can > go to Start --> Run and type services.msc > > Scroll through there and see if your service is listed. You might > check to see if you can enable/disable it via that console as well. Seems like I misunderstood Windows services (I'm porting UNIX daemon to Windows so I'm thinking in UNIX terms). I didn't know I have to _install_ a service before I _start_ it. How do I install a service? -- "Now the storm has passed over me I'm left to drift on a dead calm sea And watch her forever through the cracks in the beams Nailed across the doorways of the bedrooms of my dreams" -- http://mail.python.org/mailman/listinfo/python-list
Re: win32serviceutil won't start
On Nov 25, 2:40 pm, Nikola Skoric <[EMAIL PROTECTED]> wrote: > I have a very simple win32serviceutil script: > import win32serviceutil, time > > win32serviceutil.StartService("burek", "localhost") > > time.sleep(10) > > exit() > > It successfuly imports win32serviceutil, and chokes on StartService: > Traceback (most recent call last): > File "foobar.py", line 3, in ? > win32serviceutil.StartService("burek", "localhost") > File "C:\Python24\Lib\site-packages\win32\lib\win32serviceutil.py", line > 399, in StartService > hs = SmartOpenService(hscm, serviceName, win32service.SERVICE_ALL_ACCESS) > File "C:\Python24\Lib\site-packages\win32\lib\win32serviceutil.py", line > 76, in SmartOpenService > return win32service.OpenService(hscm, name, access) > pywintypes.error: (1060, 'OpenService', 'The specified service does not > exist as an installed service.') > > What does that mean? > > -- > "Now the storm has passed over me > I'm left to drift on a dead calm sea > And watch her forever through the cracks in the beams > Nailed across the doorways of the bedrooms of my dreams" Looks like Microsoft thinks you mis-spelled it. http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/w2000Msgs/3310.mspx?mfr=true I would check and see if that service is installed on your PC. You can go to Start --> Run and type services.msc Scroll through there and see if your service is listed. You might check to see if you can enable/disable it via that console as well. Mike -- http://mail.python.org/mailman/listinfo/python-list
win32serviceutil won't start
I have a very simple win32serviceutil script: import win32serviceutil, time win32serviceutil.StartService("burek", "localhost") time.sleep(10) exit() It successfuly imports win32serviceutil, and chokes on StartService: Traceback (most recent call last): File "foobar.py", line 3, in ? win32serviceutil.StartService("burek", "localhost") File "C:\Python24\Lib\site-packages\win32\lib\win32serviceutil.py", line 399, in StartService hs = SmartOpenService(hscm, serviceName, win32service.SERVICE_ALL_ACCESS) File "C:\Python24\Lib\site-packages\win32\lib\win32serviceutil.py", line 76, in SmartOpenService return win32service.OpenService(hscm, name, access) pywintypes.error: (1060, 'OpenService', 'The specified service does not exist as an installed service.') What does that mean? -- "Now the storm has passed over me I'm left to drift on a dead calm sea And watch her forever through the cracks in the beams Nailed across the doorways of the bedrooms of my dreams" -- http://mail.python.org/mailman/listinfo/python-list