[Tutor] Making a function run every second.

bodsda at googlemail.com bodsda at googlemail.com
Tue Nov 29 16:19:11 CET 2011


You won't get it exactly on because the time it takes to call the function will affect your trigger time.

I would use something like an infinite loop with a 1 second sleep after the function call

Bodsda 
Sent from my BlackBerry® wireless device

-----Original Message-----
From: "Mic" <o0MB0o at hotmail.se>
Sender: tutor-bounces+bodsda=googlemail.com at python.org
Date: Tue, 29 Nov 2011 15:54:59 
To: <tutor at python.org>
Subject: [Tutor] Making a function run every second.

Hi

I want a function to run every second , how do I do that?

Say that the function look like this:

def hi():
    print("hi")


Thanks! 


Mic
_______________________________________________
Tutor maillist  -  Tutor at python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


More information about the Tutor mailing list