mercredi 10 janvier 2018

How to know when a script is paused

I searched the site and the internet but I only found how to pause a script, which is the opposite of what I need.

I have a python script that sometimes, under certain conditions, prints on the terminal something like "if you want to continue press enter". I would like to know the "pause condition" of the script, so as to tell the code something like:

if **the code is waiting for something**:
   do something

I'm using python 2.7 on MacOS.

Aucun commentaire:

Enregistrer un commentaire