Python Tricks useful in day to day job of a developer

Tags : Python


Let's start with a First Tip

  1. Running a long running script in the background, but still tracking its progress in realtime.

    • Setting up to run the script in the background using nohup and logging the output into a output file.
      nohup python3 -u sample_script.py > script_output.log &

    • Monitoring the output in the realtime using tail.
      tail -f script_output.log