Is This Way OK?
john.abel at pa.press.net
Sun Mar 30 22:04:52 CEST 2003
I've been playing around with Medusa, and wanted to run a small FTP server
as a service. Can someone have a look at this code, and see any problems I
may have with it? It works OK, but examples of Medusa as a Win32 service
are few, and far between. This is the main function from my service:
def SvcDoRun( self ):
logFile = logger.file_logger(
ftpServ = ftp_server.ftp_server( Win32Authorizer(),
map = asyncore.socket_map
retCode = win32event.WaitForSingleObject( self.hWaitStop, 500 )
if retCode == win32event.WAIT_OBJECT_0:
It works OK, I can stop and start the service without any problems.
However, am I likely to run into any problems by using this cutdown, and
modified version of asyncore.loop?
More information about the Python-list