Quantcast
Channel: Python core application - Stack Overflow
Browsing all 4 articles
Browse latest View live

Answer by steveha for Python core application

import mytimerimport sysfrom threading import Locklock = Lock()lock.acquire() # put lock into locked statedef main(): timer = mytimer() lock.acquire() # blocks until someone calls lock.release()if...

View Article


Answer by steveha for Python core application

A Google search for "python timer" finds:http://docs.python.org/library/sched.htmlhttp://docs.python.org/release/2.5.2/lib/timer-objects.htmlThe sched module seems to be exactly what you...

View Article


Answer by Andrew Schleifer for Python core application

Create a function in your script which tests a select or poll object to terminate a loop. Check out serve_forever in SocketServer.py from the standard library as an example.

View Article

Python core application

I'm new to Python and I'm writing a script thatincludes some timed routines. My current approach is to instantiate a classthat includes those Timers (from: threading.Timer),but I don't want the script...

View Article
Browsing all 4 articles
Browse latest View live


Latest Images