Now this question might seem like an questions like this one and this one.
However unfortunately the above solutions don't work for me. I need a way to execute a Python 3.4.3 script, leave it running when the terminal closes, and have it not hang in terminal and executed directly.
pi@raspberrypi:/var/www/html/mysite/scripts $ nohup python3 my.script.py &
The above runs the script, but it hangs in terminal, I cannot enter any other commands until I stop it, by pressing CTRL + C.
Is there a way to achieve something like this:
pi@raspberrypi:/var/www/html/mysite/scripts $ nohup python3 my.script.py &
pi@raspberrypi:/var/www/html/mysite/scripts $
(Now I enter more commands, despite the script still running)
I hope I have provided enough information, hopefully you can help me, thanks!
nohup python3 my.script.py&www-data@raspberrypi:~/html/mysite/scripts $ nohup python3 my.script.py &my.script.py? I asked for an exact copy/paste because your initial post had the same line and was missing the ampersand, which would cause the issue you saw. "Extraordinary claims require extraordinary evidence." You're claiming that the ampersand doesn't cause the command to be executed in the background, so you're going to have to be very convincing with your evidence.