> Now I only have to find a reliable way of detecting if sb_server is > already running, start it if needed, and shut it down when done.
There are various ways to check this, e.g.: 1. If you're sure that nothing else on the machine will try and use the same ports as SpamBayes, then you can check to see whether a connection is accepted (either to a proxy port or to the HTML UI port). 2. You can grep through ps and check for a 'python sb_server.py' (or however you have it setup) process. 3. You could add code to the open_platform_mutex function in sb_server to open some sort of lock for your platform (e.g. create a directory, and delete it on close) and use that to check whether sb_server is running. =Tony.Meyer -- Please always include the list (spambayes at python.org) in your replies (reply-all), and please don't send me personal mail about SpamBayes. http://www.massey.ac.nz/~tameyer/writing/reply_all.html explains this. _______________________________________________ SpamBayes@python.org http://mail.python.org/mailman/listinfo/spambayes Check the FAQ before asking: http://spambayes.sf.net/faq.html