time module question

John Benson jsbenson at bensonsystems.com
Mon Jan 19 17:46:52 CET 2004


I display a little date and time (down to the seconds) in my Tkinter GUI
using Twisted internet sockets and ask Twisted to call a routine the
rerequests itself every second. That routine also updates the clock display,
so when I can see the seconds counting up, I know that the main event loop
isn't frozen for whatever reason. This is not time module functionality, but
event scheduling within Twisted. Tkinter also has this capability of calling
a function of your choice at some point in the future.

This rather handily replaced an older, more paranoid version in which I
logged a "heartbeat" message every so often to convince myself that all was
well.


Message: 5
Date: Mon, 19 Jan 2004 05:12:39 GMT
From: Jeff Seale <jseale18 at insightbb.com>
Subject: time module question
To: python-list at python.org
Message-ID: <Xns94752211F12jseale18insightbbcom at 204.127.204.17>

How would one go about writing a program which included a clock that
updated itself? Right now I'm able to display the time in a text widget in
the window but I can't get it to update.








More information about the Python-list mailing list