Re: python spawn new process, rout stdin/out

2006-02-17 Thread kmkz
How exactly do I map the main program's STDOUT (what the user sees) to
the subprocess' STDOUT? In effect I want it to appear as though they
just executed the program itself.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: python spawn new process, rout stdin/out

2006-02-17 Thread kmkz
ok solved that by using the call() method

I now have a bigger problem: the executable always wants to open in its
own window. how do I stop this?

-- 
http://mail.python.org/mailman/listinfo/python-list


Kill forked processes

2006-02-26 Thread kmkz
Hi,

I have a program A that forks off two other programs, B and C. I need B
and C to both terminate if A is closed, but by using the
subprocess.call() method this seems to not be the case; I can shut down
the "black box" that is program A and B/C will still stay up.

How can I achieve the desired behavior?

Thanks,
Evan

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Kill forked processes

2006-02-26 Thread kmkz
Thank you for your reply. I will certainly look into those.

Another question:

Lets say my script A executes two other scripts, B and C. B is a Python
file compiled into an exe and uses the regular black box. C, however,
is a C++ program that I did not write, and have no access to (besides
executing it. ie, i don't have its source). I would like to fork off
the process B and C from A, but make B and C invisible and unable to be
shut down by the user. This way, they have to kill process A.
Unfortunately, this brings me back to the problem I posted above: how
to make the subprocesses dependant on its parent process. Since I have
no access to the C++ program's source I need to come up with a better
way of forcing the OS to "see" process B as being inside of process C
and then shut it down, deallocate its memory, close its pipes, etc...

Any ideas?

I'll be willing to PayPal $10 to anyone who completely figures this out
for me :)

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Kill forked processes

2006-02-27 Thread kmkz
I didn't mean that you'd have to write it for me, I meant that if what
you said works (atexit, signal) I will paypal you $10 for your generous
contribution to my project.

-- 
http://mail.python.org/mailman/listinfo/python-list