Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to run shell command ctrl + c in python script

# Pressing Ctrl-C sends a SIGINT signal to your program. 
# You can do that yourself from the command line with "kill INT xxxx" 
# where xxxx is the PID of the program.

import os
import signal

os.kill(p.pid,signal.SIGINT)
Comment

PREVIOUS NEXT
Code Example
Python :: ast python 
Python :: modulo python 
Python :: Python Difference between two dates and times 
Python :: how to have player input in python 
Python :: counter +1 python 
Python :: check number of elements in list python 
Python :: python cv2 write to video 
Python :: adding one element in dictionary python 
Python :: static files not loading 404 error django 
Python :: python image crop 
Python :: qpushbutton pyqt5 
Python :: float to int in python 
Python :: send mail through python 
Python :: python change directory to previous 
Python :: pandas order dataframe by index of other dataframe 
Python :: python get 2d array output as matrix 
Python :: python argument parser default value 
Python :: np.r_ 
Python :: ip validity checker python 
Python :: numpy sqrt 
Python :: pandas filter rows by value 
Python :: Python Date object to represent a date 
Python :: rename keys in dictionary python 
Python :: taille du liste python 
Python :: Comparison of two csv file and output with differences? 
Python :: string acharacters count in python without using len 
Python :: fastapi oauth2 
Python :: how to filter queryset with foreign key in django 
Python :: epoch to gmt python 
Python :: Rectangle with python 
ADD CONTENT
Topic
Content
Source link
Name
9+5 =