Re: attach to process by pid?

Discussion in 'Python' started by James Mills, Mar 9, 2011.

  1. James Mills

    James Mills Guest

    On Wed, Mar 9, 2011 at 9:20 AM, Danny Shevitz <> wrote:
    > Is there any way to attach to an already running process by pid? I want to send
    > commands from python to an application that is already running. I don't want to
    > give the command name to subprocess.Popen.


    Unless I'm missing something here I don't see how you could
    achieve communication with another process unless that
    process has some kind of communication(s) interface; eg:
    * some kind of listening socket
    * some kind of I/O (pipe, stdin/stdout)

    cheers
    James

    --
    -- James Mills
    --
    -- "Problems are solved by method"
    James Mills, Mar 9, 2011
    #1
    1. Advertising

  2. On Mar 8, 7:49 pm, James Mills <> wrote:
    > On Wed, Mar 9, 2011 at 9:20 AM, Danny Shevitz <> wrote:
    > > Is there any way to attach to an already running process by pid? I want to send
    > > commands from python to an application that is already running. I don't want to
    > > give the command name to subprocess.Popen.

    >
    > Unless I'm missing something here I don't see how you could
    > achieve communication with another process unless that
    > process has some kind of communication(s) interface; eg:
    > * some kind of listening socket
    > * some kind of I/O (pipe, stdin/stdout)
    >
    > cheers
    > James
    >
    > --
    > -- James Mills
    > --
    > -- "Problems are solved by method"



    Have a look at the SIMPL toolkit. http://www.icanprogram.com/06py/lesson1/lesson1.html

    This should be able to do exactly what you want.

    bob
    bobicanprogram, Mar 9, 2011
    #2
    1. Advertising

  3. Danny Shevitz, Mar 9, 2011
    #3
  4. On Mar 9, 1:28 pm, Danny Shevitz <> wrote:
    > > Have a look at the SIMPL toolkit.

    >
    > http://www.icanprogram.com/06py/lesson1/lesson1.html
    >
    >
    >
    > > This should be able to do exactly what you want.

    >
    > > bob

    >
    > Does this work on Mac OS X?
    >
    > thanks,
    > Danny



    I'm not aware of any ports of the SIMPL toolkit to the MacOSX.
    However, the core SIMPL library doesn't depend on anything facier than
    a named pipe or fifo and shared memory. If you'd like to be the test
    bed I can ask around the SIMPL project to see if anyone wants to take
    a crack at porting the SIMPL-Python stuff to MacOSX.

    bob
    bobicanprogram, Mar 10, 2011
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    649
  2. Warren Tang
    Replies:
    1
    Views:
    538
    Warren Tang
    Sep 17, 2008
  3. Danny Shevitz

    attach to process by pid?

    Danny Shevitz, Mar 8, 2011, in forum: Python
    Replies:
    11
    Views:
    1,916
    Alexander Kapps
    Mar 16, 2011
  4. Miki Tebeka

    Re: attach to process by pid?

    Miki Tebeka, Mar 10, 2011, in forum: Python
    Replies:
    2
    Views:
    761
    Grant Edwards
    Mar 12, 2011
  5. P.S.
    Replies:
    0
    Views:
    317
Loading...

Share This Page