'Can someone help me with a Python command for ctrl + c
I am running a python script on Secure CRT to capture certain data logs. My logs can be stopped by pressing ctrl+c physically on the keyboard. So far I have used the following but to no avail. Can someone tell me how to send ctrl+c as a command to secure CRT ?
tab.Screen.Send("kill -2\n")-
import os import signal os.kill(p.pid,signal.SIGINT)
Solution 1:[1]
I found the answer. If anyone faces a similar issue in the future -
tab.Screen.Send("\003")
OR
crt.Screen.Send("\003")
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Rcoder98723 |
