Python Forum
Problem to interrupting process
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem to interrupting process
#2
I will try to be clearer:

I have his files:
file1.py -> I get the data in bluetooth
file2.py -> Send the text to the matrix.
file3.py -> I have to do CTRL-C to clear the matrix, it's obligatory if I want to display another text.

file4.py -> I prepared this code
pid = int (subprocess.Popen (['pgrep', 'python'], stdout = subprocess.PIPE) .stdout.readline () [: - 1])
os.killpg (os.getpgid (pid), signal.SIGINT)
If I manually run the file file4.py, the statement arrives at the file file3.py.
I need to automate the execution of file4.py when I send a new text to the matrix. But how ?
Reply


Messages In This Thread
Problem to interrupting process - by DJ_Depannage - May-19-2019, 07:10 PM
RE: Problem to interrupting process - by DJ_Depannage - May-20-2019, 01:01 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to sharing object between multiple process from main process using Pipe Subrata 1 3,784 Sep-03-2019, 09:49 PM
Last Post: woooee
  Problem: Once I cancel the process my program will start working! Hadad 0 1,735 Jul-24-2019, 04:09 PM
Last Post: Hadad

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020