How can I avoid python printing to the terminal when running in the background? I want it to print when run in the foreground or piped to another file, which it does successfully, but not print when run in the background.
For example, I have a file testing.py. With one line:
print("This is just a test")
If I run in the terminal
>python testing.py
It gives me:
This is just a test
However, if I run the script in the background,
python testing.py &
I still get
This is just a test
printed to the terminal, directly into my command prompt.