May-20-2019, 01:01 PM
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
I need to automate the execution of file4.py when I send a new text to the matrix. But how ?
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 ?