I'm using Python 3.1.2 on Windows 7. I have windows service written in C which starts python script and it doesn't work. However when C program isn't windows service it works flawlessly.
// part of windows service Py_Initialize(); PyRun_SimpleString(buffer); Py_Finalize(); # python scipt import http.server try: server = http.server.HTTPServer(('', 9000), http.server.SimpleHTTPRequestHandler) server.serve_forever() except Exception as inst: f = open("c:\\log.txt", "w") f.write(str(type(inst))) f.write(str(inst.args)) f.write(str(inst)) f.close() // log.txt <class 'AttributeError'>("'NoneType' object has no attribute 'write'",)'NoneType' object has no attribute 'write' _______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32