Can anybody tell me how to develop Windows Services (which are actually
daemons) using Python. Also what protocol is most suitable for
developing a server-client application with the server running as a
Windows Service.
Thanks in advance
Bye
Yes, anyone can tell you. Anyone who can use Google that is. Can you?
http://www.google.com/search?q=python+windows+service
(There are directly relevant answers on the first page of results.)
> Also what protocol is most suitable for
> developing a server-client application with the server running as a
> Windows Service.
I'd suggest whatever protocol is most suitable for developing
client-server applications with the server *not* running as a Windows
Service. In other words, I don't think the manner in which the service
is invoked has much impact on the protocol you would use.
Generally the best protocol is determined more by what your server will
actually do, and performance requirements, than anything else.
-Peter
Thanks to Peter, now I know how to control an *existing* Windows
service and how to run a *python script* as a Windows service. Although
these were really useful, my point was different.
I have developed a script that monitors a specified folder for changes
in the files or folders within it. I converted that script to a stand
alone exe using py2exe. ***Now I would like to run that exe as a
Windows service***.
I also intend to create an exe that will retrieve any information
stored by the file monitor mentioned above.
Please tell me how do I go about it.
Although I am a beginner in Python and Windows Services (Daemon), I am
a moderately experienced programmer.
-Regards
Here is an alternative solution.
I have a simple socket server program, which I wanted to run as a
service on Linux and Windows.
On Linux it was easy - start it from rc.local with a trailing &.
On Windows, I was given advice on how to use pywin32 to set up the
program as a Windows service, but it felt like overkill. Then someone
suggested 'srvany', a utility that allows you to run any program as a
service. It is part of the NT Resource Kit. I downloaded it and it
works fine for me. Google has plenty of references.
Frank Millman
If something is going to be run as a service then it has to use the
Windows service API so it responds correctly to being started and
stopped, for example, and "pumps" the event queue from time to time.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
Every one please accept my thanks.
I have stopped using Python IDLE. Know I am using Pythonwin IDE from
Active State. They have the same core modules. But the Pywin32
extensions are a plus from Active State.
The problem is that the Pywin32 Documentation is incomplete/incorrect.
The modules by Mark Hammond are in .pyd and not in .py. The
documentayion on Active's web site is also incorrect. Here is a code
snippet from the IDE
import win32service
>>> ws=win32service
>>> ws.CreateDesktop()
Traceback (most recent call last):
File "<interactive input>", line 1, in ?
TypeError: CreateDesktop() takes exactly 4 arguments (0 given)
>>>
And here is the prototype from the documentation
win32service.CreateDesktop
PyHDESK = CreateDesktop()
Creates a new desktop in calling process's current window station
The documentation does not mention any arguments, yet there is a
TypeError.
The source code in C at Pywin32 extensions homepage are of not much
help.
So, how do i use win32 extensions?
Regards
hth
Roger
----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Thanks Upole!!!!!!! I dowloaded it. From exe files at sourceforge.net.
Regards