<P>More like copy/paste/cleanup</P>
<P>I've since updated things... I'm thinking that perhaps the log is shutdown.</P>
<P>So I'm now writing files. I get the start file, but not the stop file:</P>
<P>from twisted.application import service<BR>from twisted.internet import reactor</P>
<P>class SimpleService(service.Service):<BR>&nbsp;&nbsp;&nbsp; def startService(self):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; service.Service.startService(self)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; reactor.addSystemEventTrigger('before','shutdown',self.stopService)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; f=open('start.txt','w')<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; f.close()<BR>&nbsp;&nbsp;&nbsp; def stopService(self):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; f=open('stop.txt','w')<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; f.write('KillJoy was here?')<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; f.close()<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; service.Service.stopService(self)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>from twisted.application import service<BR>from twisted.internet import reactor</P>
<P>import simpleService</P>
<P>application = service.Application('testServer')<BR>serviceCollection=service.IServiceCollection(application)<BR>ss=simpleService.SimpleService()<BR>ss.setServiceParent(serviceCollection)<BR>reactor.stop()<BR></P>
<P>C:\other\Bill\compstrm\compstrm\twbsd&gt;twistd -noy testService.py<BR>2004/05/21 19:29 India Standard Time [-] Log opened.<BR>2004/05/21 19:29 India Standard Time [-] twistd 1.2.0 (C:\Python23\python.exe 2.<BR>3.3) starting up<BR>2004/05/21 19:29 India Standard Time [-] reactor class: twisted.internet.default<BR>.SelectReactor<BR>2004/05/21 19:29 India Standard Time [-] Main loop terminated.<BR>2004/05/21 19:29 India Standard Time [-] Server Shut Down.</P>
<P>C:\other\Bill\compstrm\compstrm\twbsd&gt;</P>
<P>Now, since its working for others, let me further report that I'm running on nt2000 with twisted 1.2.</P>
<P>Mmm. Perhaps I'd best reinstall. I may have messed up some twisted code while adding print statements. :-O</P>
<P>&nbsp;</P><BR><BR>Bill la Forge<br>http://www.geocities.com/laforge49/<p><font face=arial size=-1>
<a href="http://in.rd.yahoo.com/specials/mailtg/*http://yahoo.shaadi.com/india-matrimony/" target="_blank">
<b>Yahoo! India Matrimony</a>:</b> Find your partner 
<a href="http://in.rd.yahoo.com/specials/mailtg2/*http://yahoo.shaadi.com/india-matrimony/community.php" target="_blank">online</a>.</font>