Is it possible to run a Python script as a background service on a webserver? I want to do this for socket communication.
on XP and later you can use the sc.exe program to use any .exe as service:
>sc create
Creates a service entry in the registry and Service Database.
SYNTAX:
sc create [service name] [binPath= ] ...
CREATE OPTIONS:
NOTE: The option name includes the equal sign.
type=
(default = own)
start=
(default = demand)
error=
(default = normal)
binPath=
group=
tag=
depend=
obj=
(default = LocalSystem)
DisplayName=
password=
You can start your pythonscript by starting the python interpreter with your script as argument:
python.exe myscript.py