By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,846 Members | 1,857 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,846 IT Pros & Developers. It's quick & easy.

windows service problem

P: n/a
i code a very simple web server with python, and i want it should run
as service on WindowsXP.

the problem is i can run the service in debug mode, and it seems works
fine(i can connect the server with browser), but when i start the
service in the services control panel, i can't connect the server, the
server seems not start, and i can't stop the service.

any advice?

Oct 3 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
JackPhil a écrit :
the problem is i can run the service in debug mode, and it seems works
fine(i can connect the server with browser), but when i start the
service in the services control panel, i can't connect the server, the
server seems not start, and i can't stop the service.


Make sure it doesn't output anything to stdout or stderr, I've run into
problems with that. I always include this kind of code in NT services:

class Devnull:
def write(self, bf):
pass
def close(self):
pass
def flush(self):
pass

sys.stdout = sys.stderr = Devnull()
Oct 3 '05 #2

P: n/a

fraca7 wrote:

Make sure it doesn't output anything to stdout or stderr, I've run into
problems with that. I always include this kind of code in NT services:

class Devnull:
def write(self, bf):
pass
def close(self):
pass
def flush(self):
pass

sys.stdout = sys.stderr = Devnull()


Thanks for your instructions. It's resolved my problem.

Oct 3 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.