[Tkinter-discuss] How fast is my computer?

Bob Greschke bob at greschke.com
Tue Apr 3 17:23:26 CEST 2007


I have several applications (Python/Tkinter, of course) that run on 
everything from 233MHz single board computers to 3GHz screamers.  I like to 
keep the user entertained by printing messages like '1000 things 
processed...', '2000 things processed...', etc.  Depending on the speed of a 
system it might be  appropriate to say something every 1000 things on some 
machines, and on others say something maybe every 50 things to keep the 
messages coming out at a reasonable pace.

Does anyone have ideas on a good, little, short, quick routine that I can 
slip into my program that will run before an operation starts that will give 
me some kind of gauge as to the speed of the system the application is 
running on so I can set my "%X" value (i.e. if Count%X == 0: say something) 
appropriate for the system speed?  (Like I'll determine the best value for X 
on the fastest machine and use this routine to scale things down from 
there.)

Thanks!

Bob



More information about the Tkinter-discuss mailing list