Running python automatically in the background
Cameron Laird
claird at lairds.com
Wed Jan 28 08:10:39 EST 2004
In article <slrnc1e4c4.14j.bignose-hates-spam at rose.localdomain.fake>,
Ben Finney <bignose-hates-spam at and-benfinney-does-too.id.au> wrote:
>On 27 Jan 2004 17:29:53 -0800, Alfred wrote:
>> 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 &
>
>That's how you tell any POSIX-compatible shell (like bash) to execute a
>command as a background job. Why is that not acceptable?
>
>> been looking around but couldn't find any docs to support a
>> possibility.
>
>Perhaps if you explain what it is you're trying to achieve, we can offer
>a better solution.
.
.
.
I'll speculate Alfred has an interest in what & does. It
does this, roughly: it forks a copy of the current process,
disconnects stdin, and transfers control to the child. So,
yes, it's possible to write a Python program that begins in
the foreground and, after a while, programmatically "back-
grounds" itself. Is that the goal?
--
Cameron Laird <claird at phaseit.net>
Business: http://www.Phaseit.net
More information about the Python-list
mailing list