Re: Re: PyDS as a service

Rudy Schockaert <[email protected]> Mon, 29 Mar 2004 21:48:24 +0200
Newsgroups gmane.comp.pythin.pyds.devel
Message-ID <[email protected]>
It almost got it working. I downloaded  
http://simon.bofh.ms/~gb/toolserver-snapshot.tar.gz , grabbed 
tsctl-win32.py and put it in my PyDS folder as PyDS-win32.py.

I then replaced all occurences of  'tsctl' with 'PyDS-start' and 
'TooFPy' with 'PyDS' and changed the service description.

I removed the following line:
from Toolserver.Config import config

And finally I removed '-c start' from the startcommand (3rd line from 
bottom)

The service installs perfectly, but doesn't want to start. I guess it 
has something to do with the absence of the HOME envrionment variable.

This is what I get in \PyDS\.PyDS\log\errors:
Exception in thread Thread-13:
Traceback (most recent call last):
  File "C:\Python23\lib\threading.py", line 436, in __bootstrap
    self.run()
  File "C:\Python23\lib\threading.py", line 416, in run
    self.__target(*self.__args, **self.__kwargs)
  File "C:\Python23\lib\site-packages\PyDS\Tool.py", line 1318, in thunk
    tool.logVerbose(_('Background process ended'))
  File "C:\Python23\lib\site-packages\PyDS\Tool.py", line 1595, in 
logVerbose
    getTool('events')._logVerbose(self.name, msg)
  File "C:\Python23\lib\site-packages\PyDS\EventsTool.py", line 87, in 
_logVerbose
    if self.getPref('verbose') or _PyDS.verbose:
  File "C:\Python23\lib\site-packages\PyDS\EventsTool.py", line 102, in 
getPref
    return getattr(self.prefs[0], pref, '')
AttributeError: EventsTool instance has no attribute 'prefs'


Paul Moore wrote:

>Georg Bauer <gb-BRhJDZTO+/[email protected]> writes:
>
>  
>
>>For TooFPy I copied the ZService script from Zope and built
>>tsctl-win32.py - a service controller script that can run TooFPy as a
>>windows service. It might be interesting to use that script for starting
>>PyDS as a service, too. Might be interesting for the Windows installer,
>>that could optionally ask to install PyDS as a service so users don't
>>have to run the open shell any more.
>>    
>>
>
>I'd like to have PyDS as a service. I've never got round to looking at
>this myself, but it's been on my list for a long while.
>
>Paul
>  
>