Running python automatically in the background
Michael Surette
msurette at laframboise.net
Wed Jan 28 10:14:26 EST 2004
On Tue, 27 Jan 2004 17:29:53 -0800, Alfred wrote:
> hi all,
>
> i'm trying to figure out if there is some easy way to run a python
> script in the background _without_ specifying "&" in a linux
> enivornment.
>
> script.py &
>
> vs
>
> script.py
>
> is there an easy way to do this?
>
> been looking around but couldn't find any docs to support a
> possibility.
>
> thanks!
>
> - al
I forget where I first found this snippet, but it's probably what you want.
PID= os.fork()
if PID != 0: sys.exit()
More information about the Python-list
mailing list