Retourner au contenu associé (entrée de forum : Programmer un daemon)
Posté par NeoX le 07 septembre 2015 à 20:48. En réponse au message Programmer un daemon. Évalué à 4.
ici il semble y avoir un exemplehttp://stackoverflow.com/questions/4637420/efficient-python-daemon
import daemon import time def do_something(): while True: with open("/tmp/current_time.txt", "w") as f: f.write("The time is now " + time.ctime()) time.sleep(5) def run(): with daemon.DaemonContext(): do_something() if __name__ == "__main__": run()
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
# j'y connais rien mais faut vraiment que je m'y mettes
Posté par NeoX . En réponse au message Programmer un daemon. Évalué à 4.
ici il semble y avoir un exemple
http://stackoverflow.com/questions/4637420/efficient-python-daemon