Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #49697

Python - forking an external process?

Newsgroups comp.lang.python
Date 2013-07-02 20:47 -0700
Message-ID <14be21de-2ceb-464a-a638-dce0368ab9e7@googlegroups.com> (permalink)
Subject Python - forking an external process?
From Victor Hooi <victorhooi@gmail.com>

Show all headers | View raw


Hi,

I have a Python script where I want to run fork and run an external command (or set of commands).

For example, after doing <xyz>, I then want to run ssh to a host, handover control back to the user, and have my script terminate.

Or I might want to run ssh to a host, less a certain textfile, then exit.

What's the idiomatic way of doing this within Python? Is it possible to do with Subprocess?

Cheers,
Victor

(I did see this SO post - http://stackoverflow.com/questions/6011235/run-a-program-from-python-and-have-it-continue-to-run-after-the-script-is-kille, but it's a bit older, and I was going to see what the current idiomatic way of doing this is).

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Python - forking an external process? Victor Hooi <victorhooi@gmail.com> - 2013-07-02 20:47 -0700
  Re: Python - forking an external process? rusi <rustompmody@gmail.com> - 2013-07-02 20:59 -0700
    Re: Python - forking an external process? Victor Hooi <victorhooi@gmail.com> - 2013-07-02 21:11 -0700
      Re: Python - forking an external process? rusi <rustompmody@gmail.com> - 2013-07-02 21:22 -0700
  Re: Python - forking an external process? Roy Smith <roy@panix.com> - 2013-07-03 00:17 -0400
  Re: Python - forking an external process? Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2013-07-03 12:55 +0200

csiph-web