On 29/11/11 14:54, Mic wrote:
I want a function to run every second , how do I do that?
Say that the function look like this:
def hi():
print("hi")
The answer depends on whether you want to do it in a GUI or in a command
line program.
Since your other posts have included GUI code I'd sugg
On 11/29/2011 11:09 AM, Dave Angel wrote:
On 11/29/2011 10:52 AM, Mic wrote:
Okay, I undestand. Hmm, what is a drift?
I just noticed I hadn't answered that one. It doesn't matter any more
since you're running tkinter.
But for completeness:
If you had a non-event driven program (eg. a con
On Tue, Nov 29, 2011 at 10:09 AM, Dave Angel wrote:
> tkinter provides a couple of specific timer events, and I now see
> your reply to a message that said to use the after() method, which is a
> one-shot. I believe there's another one that sets a periodic timer so you
> don't have to do an afte
On 11/29/2011 10:52 AM, Mic wrote:
-Ursprungligt meddelande- From: Dave Angel
Sent: Tuesday, November 29, 2011 4:33 PM
-Original Message-
From: "Mic"
Sender: tutor-bounces+bodsda=googlemail@python.org
Date: Tue, 29 Nov 2011 15:54:59
To:
Subject: [Tutor] Making
ge: 3
Date: Tue, 29 Nov 2011 10:33:41 -0500
From: Dave Angel
To: bod...@googlemail.com
Cc: Tutor - python List , Mic
Subject: Re: [Tutor] Making a function run every second.
Message-ID: <4ed4fb55.1000...@davea.name>
Content-Type: text/plain; charset=windows-1252; format=flowed
(You put yo
-Ursprungligt meddelande-
From: Dave Angel
Sent: Tuesday, November 29, 2011 4:33 PM
To: bod...@googlemail.com
Cc: Mic ; Tutor - python List
Subject: Re: [Tutor] Making a function run every second.
(You put your response in the wrong place; it belongs after the part
you're qu
-Ursprungligt meddelande-
From: bod...@googlemail.com
Sent: Tuesday, November 29, 2011 4:19 PM
To: Mic ; tutor-bounces+bodsda=googlemail@python.org ; Tutor - python
List
Subject: Re: [Tutor] Making a function run every second.
You won't get it exactly on because the ti
inite loop with a 1 second sleep after the
function call
Bodsda
Sent from my BlackBerry® wireless device
-Original Message-
From: "Mic"
Sender: tutor-bounces+bodsda=googlemail@python.org
Date: Tue, 29 Nov 2011 15:54:59
To:
Subject: [Tutor] Making a function run every s
Mic wrote:
> I want a function to run every second , how do I do that?
>
> Say that the function look like this:
>
> def hi():
> print("hi")
For a console app you could use a for-loop with time.sleep() or
http://docs.python.org/dev/py3k/library/sched.html
For a script that uses tkinter the
c"
Sender: tutor-bounces+bodsda=googlemail@python.org
Date: Tue, 29 Nov 2011 15:54:59
To:
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("h
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@python.org
To
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@python.org
To unsubscribe or change subscription options:
http://mail.python.org
12 matches
Mail list logo