Let My Terminal Go

marduk usenet at marduk.letterboxes.org
Tue Oct 11 08:37:48 CEST 2005


On Mon, 2005-10-10 at 22:58 -0700, mystilleef at gmail.com wrote:
> Hello,
> 
> A user of my application points me to a behavior in gVim,
> the text editor, that I would like to implement in my
> application.
> 
> When gVim is launched from a shell terminal, it completely
> frees the terminal. You can continue to use the terminal for
> whatever purpose you wish, including closing and exiting it,
> without any effect on the running gVim instance.
> 
> How do I implement this in my application written in python?
> I would like to believe it does not involve me forking my
> application in a new process. Maybe there is signal I can
> send to the operating system to achieve this, right?

gvim forks.  Why do you want to avoid it?

import os, sys

pid = os.fork()
if pid !=0:
    # exit parent
    sys.exit(0)
# child continues





More information about the Python-list mailing list