Python without a tty

Alain Ketterlin alain at
Thu Sep 29 11:53:12 CEST 2011

Steven D'Aprano <steve+comp.lang.python at> writes:

> I have a Python script which I would like to test without a tty attached 
> to the process. I could run it as a cron job, but is there an easier way?
> I am running Linux.

Isn't os.setsid() what you're looking for? It makes the calling process
have no controlling terminal. There's also a user command called setsid
that should have the same effect.

-- Alain.

More information about the Python-list mailing list