Sign in to follow this  
Followers 0
MrTWist

Send Ctrl+C to Python process

1 post in this topic

I'm trying to send Ctrl+C to a Python process with no luck.

If I spin the the Python process up in a DOS batch file, I can communicate with the window via the console.

If I use Run(), the process doesn't seem to accept console input -- specifically the CTRL+C ( via Chr(3) ) I'm trying to send.

What am I missing here?

$pid = ""

Func Start()

$pid = Run("C:\Python25\python.exe C:\Python\scotch\bin\run-recording-proxy", "", "", $STDIN_CHILD + $STDOUT_CHILD)

EndFunc

Func Stop()

$result = StdinWrite($pid, Chr(3))

MsgBox(1, $result, $result)

EndFunc

Share this post


Link to post
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0