Consider the following python code:
Status = 1
while Status == 1:
print("Program is Running")
else:
print("Program is not Running")
I want to be able to run a command in a different (bash) terminal that changes the variable Status.
I have looked at similar questions on the website, but they assume that you get input from where you run the program.
I have seen this be applied in scenarios as:
Run the program in one terminal
Open the second and write
pathtocode/code.py toggle
which stops the program.
If anybody could help me with this I would greatly appreciate it.