Running a command in the background of python is beautiful

The output of python is buffered, resulting in python.log3 not being able to see the output right away.
Use the -u parameter to make python not enable buffering.
So correct the command and you can use it normally

nohup python -u test.py > out.log 2>&1 &

View output
tail -f out.log

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326262851&siteId=291194637