ut.
Thanks
FootNote:
If money does not grow on trees, then why do banks have branches?
-Original Message-
From: Python-list On
Behalf Of Dennis Lee Bieber
Sent: Saturday, July 18, 2020 12:04 PM
To: python-list@python.org
Subject: Re: Seeking to convert a py timer app for my Moto E6
On Sat, 1
I am looking for an app for my Moto e6 android phone that will accept a number
of hours and then count down. Once the hours have been executed, it will
quietly beep every minute until I cancel the app. This is to remind me (and
keep on reminding me) when to take my insulin.
It has been writt
Another way on unix that doesn't use signals:
import select, sys
print("Enter something: ", end = "")
sys.stdout.flush()
fds = select.select((0,), (), (), 5)
if fds[0] == [0]:
data = sys.stdin.readline()
print("You entered:", data)
else:
print("Too late!")
--
Greg
--
https://mail.py
I have some success with this. I am not sure if this would work longer term,
as in restarting it, but so far so good. Any issue with this new code?
import time
from threading import Thread
th=Thread()
class Answer(Thread):
def run(self):
a=input("What is your answer:")
if a
getch() function that can be setup with a halfdelay()
timer.
https://docs.python.org/3/howto/curses.html
That's the closest I could find to getting input with a time-out from the
terminal. If it's to kludgy, you'll have to roll your own OS-specific version.
My guess is that
David D wrote:
> Is there a SIMPLE method that I can have a TIMER count down at a user input
> prompt - if the user doesn't enter information within a 15 second period, it
> times out.
Does this do what you want?
from threading import Timer
import sys
import os
def run_later():
This works, but does not do exactly what I want. When the user enters in a
correct answer, the program and threading stops. Any ideas on what I should
change?
import time
from threading import Thread
class Answer(Thread):
def run(self):
a=input("What is your answer:")
if a=
This works, but does not do exactly what I want. What I want to happen is :
when the user enters in a correct answer, the program and threading stops. Any
ideas on what I should change?
import time
from threading import Thread
class Answer(Thread):
def run(self):
a=input("What
On Wed, Jul 4, 2018 at 12:05 AM, Marko Rauhamaa wrote:
> Gregory Ewing :
>
>> Robin Becker wrote:
>>> if I leave out the signal.signal(signal.SIGALRM,signal.SIG_IGN) then
>>> the timeout function gets called anyway.
>>
>> Yes, it needs some more stuff around it to make it useful. Probably
>> you a
50-322-6755
> On 02-Jul-2018, at 11:12 PM 🌙, Gregory Ewing
> wrote:
>
> David D wrote:
>> Is there a SIMPLE method that I can have a TIMER count down at a user input
>> prompt - if the user doesn't enter information within a 15 second period, it
>> ti
Gregory Ewing :
> Robin Becker wrote:
>> if I leave out the signal.signal(signal.SIGALRM,signal.SIG_IGN) then
>> the timeout function gets called anyway.
>
> Yes, it needs some more stuff around it to make it useful. Probably
> you also want the signal handler to raise an exception and catch it
>
Robin Becker wrote:
if I leave out the signal.signal(signal.SIGALRM,signal.SIG_IGN) then the
timeout function gets called anyway.
Yes, it needs some more stuff around it to make it useful.
Probably you also want the signal handler to raise an
exception and catch it somewhere rather than exiting
On 03/07/2018 07:12, Gregory Ewing wrote:
import signal, sys
def timeout(*args):
print("Too late!")
sys.exit(0)
signal.signal(signal.SIGALRM, timeout)
signal.setitimer(signal.ITIMER_REAL, 15)
data = input("Enter something: ")
print("You entered: ", data)
This doesn't work in windows
David D wrote:
Is there a SIMPLE method that I can have a TIMER count down at a user input
prompt - if the user doesn't enter information within a 15 second period, it
times out.
import signal, sys
def timeout(*args):
print("Too late!")
sys.exit(0)
signal.signal
Is there a SIMPLE method that I can have a TIMER count down at a user input
prompt - if the user doesn't enter information within a 15 second period, it
times out. I am going to be using pycharm and not the shell. Thanks in
advance.
--
https://mail.python.org/mailman/listinfo/python-list
On Wednesday, 30 November 2016 20:36:15 UTC+5:30, siva gnanam wrote:
> On Wednesday, November 30, 2016 at 8:11:49 PM UTC+5:30, vnthma...@gmail.com
> wrote:
> > from threading import Timer
> >
> > class TestTimer:
> > def foo(self):
On Wed, Nov 30, 2016 at 8:06 AM, siva gnanam
wrote:
> On Wednesday, November 30, 2016 at 8:11:49 PM UTC+5:30, vnthma...@gmail.com
> wrote:
>> from threading import Timer
>>
>> class TestTimer:
>> def foo(self):
>> print("hello world&quo
On Wednesday, November 30, 2016 at 8:11:49 PM UTC+5:30, vnthma...@gmail.com
wrote:
> from threading import Timer
>
> class TestTimer:
> def foo(self):
> print("hello world")
> self.startTimer()
>
> def startTimer(self):
>
On Wednesday, November 30, 2016 at 7:35:46 PM UTC+5:30, siva gnanam wrote:
> The following program print hello world only once instead it has to print the
> string for every 5 seconds.
>
> from threading import Timer;
>
> class TestTimer:
>
>
from threading import Timer
class TestTimer:
def foo(self):
print("hello world")
self.startTimer()
def startTimer(self):
self.t1 = Timer(5, self.foo)
self.t1.start()
timer = TestTimer()
timer.startTimer()
--
https://mail.python.org/mailma
The following program print hello world only once instead it has to print the
string for every 5 seconds.
from threading import Timer;
class TestTimer:
def __init__(self):
self.t1 = Timer(5.0, self.foo);
def startTimer(self):
self.t1.start
? Normally you'd have to call a function in pthreads (OS call)
One can sort of figure that t.start() hides the actual OS call, but when
we implement run().. somehow, magically there's no OS call? WTH! ??
Then in the Timer example in the next section, how is
the whole delay/canecl bit impleme
In a message of Thu, 01 Oct 2015 20:47:10 +0100, Dave Farrance writes:
>Laura Creighton wrote:
>
>>In a message of Thu, 01 Oct 2015 20:03:26 +0100, Dave Farrance writes:
>>>Laura Creighton wrote:
>>>
In a message of Thu, 01 Oct 2015 18:45:06 +0100, Dave Farrance writes:
>Yet the documenta
Laura Creighton wrote:
>In a message of Thu, 01 Oct 2015 20:03:26 +0100, Dave Farrance writes:
>>Laura Creighton wrote:
>>
>>>In a message of Thu, 01 Oct 2015 18:45:06 +0100, Dave Farrance writes:
Yet the documentation says that it's mandatory for the GUI backend base
to implement stop()
In a message of Thu, 01 Oct 2015 20:03:26 +0100, Dave Farrance writes:
>Laura Creighton wrote:
>
>>In a message of Thu, 01 Oct 2015 18:45:06 +0100, Dave Farrance writes:
>>>Yet the documentation says that it's mandatory for the GUI backend base
>>>to implement stop() but that single_shot is option
Laura Creighton wrote:
>In a message of Thu, 01 Oct 2015 18:45:06 +0100, Dave Farrance writes:
>>Yet the documentation says that it's mandatory for the GUI backend base
>>to implement stop() but that single_shot is optional. Ho hum.
>
>report as a bug. its a doc bug at least, but I think its a r
In a message of Thu, 01 Oct 2015 18:45:06 +0100, Dave Farrance writes:
>Yet the documentation says that it's mandatory for the GUI backend base
>to implement stop() but that single_shot is optional. Ho hum.
report as a bug. its a doc bug at least, but I think its a real bug,
and your code should
Laura Creighton wrote:
>In a message of Thu, 01 Oct 2015 17:36:50 +0100, Dave Farrance writes:
>>I'm trying to set up the basics of a timer-scheduled function in
>>matplotlib and I can't figure out how to stop the timer. Maybe the
>>stop() method is dysfunction
In a message of Thu, 01 Oct 2015 17:36:50 +0100, Dave Farrance writes:
>I'm trying to set up the basics of a timer-scheduled function in
>matplotlib and I can't figure out how to stop the timer. Maybe the
>stop() method is dysfunctional in Ubuntu 14.04 or maybe I'm getting
I'm trying to set up the basics of a timer-scheduled function in
matplotlib and I can't figure out how to stop the timer. Maybe the
stop() method is dysfunctional in Ubuntu 14.04 or maybe I'm getting the
syntax wrong.
If anybody's got matplotlib installed, can you try this co
threading using the Python/C API. I have an
>> extension that implements a timer, and the C++ timer callback function
>> calls a Python function. The relevant code looks like this:
>>
>> [snip]
>>
>> static void CALLBACK PeriodicTimer(UINT wTimerID, UINT ms
On 06/30/2010 09:28 PM, p...@mail.python.org wrote:
> I have a problem with threading using the Python/C API. I have an
> extension that implements a timer, and the C++ timer callback function
> calls a Python function. The relevant code looks like this:
>
> [snip]
>
>
I have a problem with threading using the Python/C API. I have an
extension that implements a timer, and the C++ timer callback function
calls a Python function. The relevant code looks like this:
static PyObject *timer_setmodname( PyObject *pSelf, PyObject *pArgs )
{
char *b
On May 11, 9:32Â pm, Terry Reedy wrote:
> On 5/11/2010 7:03 PM, Mensanator wrote:
>
> > On May 11, 4:37 pm, Terry Reedy  wrote:
>
> >> In the command line interpreter, you should be able to hit up
> >> arrow and have the line above copied to the current entry line for
> >> correction. In IDLE, this
On 5/11/2010 7:03 PM, Mensanator wrote:
On May 11, 4:37 pm, Terry Reedy wrote:
In the command line interpreter, you should be able to hit up
arrow and have the line above copied to the current entry line for
correction. In IDLE, this does not yet work,
It doesn't have to. Simply place the cu
On May 11, 4:37Â pm, Terry Reedy wrote:
> On 5/11/2010 3:28 PM, Donna Lane wrote:
>
> > I have downloaded Python and I'm a beginner in every sense.
>
> Welcome. I hope you enjoy Python too.
>
> Â > What I want to> know now is when I am in Idle and have made a syntax error
> how do I repair?
> > Aft
On 5/11/2010 3:28 PM, Donna Lane wrote:
I have downloaded Python and I'm a beginner in every sense.
Welcome. I hope you enjoy Python too.
> What I want to
know now is when I am in Idle and have made a syntax error how do I repair?
After the error I can't type in anything and I get this bing n
On Tue, May 11, 2010 at 12:28 PM, Donna Lane wrote:
> I have downloaded Python and I'm a beginner in every sense. What I want to
> know now is when I am in Idle and have made a syntax error how do I repair?
> After the error I can't type in
>
> anything and I get this bing noise. Usually I just
I have downloaded Python and I'm a beginner in every sense. What I want to
know now is when I am in Idle and have made a syntax error how do I repair?
After the error I can't type in
anything and I get this bing noise. Usually I just start idle over again.
Thanks to anyone out there who respond
now attempted to use a timer, but this does not seem to run the
> function at the end of the time. The code of my latest attempt:
>
> def next(self=None, testnum=10, testspeed=5):
> self.count += 1
> #Sets label, telling the user the next word to memorise
> self.nobtns.
I'm writing a pyGTK program, and I need to display the contents of a
window for a few seconds before automatically moving on. I have tried
using the time.sleep method, but this has problems, such as the program
becoming unresponsive.
I have now attempted to use a timer, but this does not se
On Wed, Feb 17, 2010 at 2:37 PM, Stephen Hansen wrote:
> On Wed, Feb 17, 2010 at 10:14 AM, Victor Subervi
> wrote:
>
>> Obviously, the removeCSS isn't going to work in that last line. What can I
>> put there to remove the splash page after 5 seconds?
>>
>
> Even though you're generating this with
On Wed, Feb 17, 2010 at 10:14 AM, Victor Subervi wrote:
> Obviously, the removeCSS isn't going to work in that last line. What can I
> put there to remove the splash page after 5 seconds?
>
Even though you're generating this with python, it doesn't have anything to
do with Python. You'll have to
> What can I
> put there to remove the splash page after 5 seconds?
>
Javascript.
--
Dotan Cohen
http://what-is-what.com
http://gibberish.co.il
Please CC me if you want to be sure that I read your message. I do not
read all list mail.
--
http://mail.python.org/mailman/listinfo/python-list
; HEIGHT="%s" id="myMovieName">' % (str(wn*1008), str(wn*200))
> Â Â Â print '''
>
>
> '''
> Â Â Â print ' quality=high bgcolor=#FF WIDTH="%s" HEIGHT="%s" NAME="myMovieName"
> ALIGN=&quo
7;'
print 'http://www.macromedia.com/go/getflashplayer";>' % (str(wn*1008),
str(wn*200))
print ''
print ''
Timer(5, removeCSS, ()).start()
Obviously, the removeCSS isn't going to work in that last line. What can I
put there to remove the
;The timeout in the options regards only a socket timeout, not further
>stages of connection negotiation, so it doesn't work there.
Does paramiko offer any kind of callback? In a similar situation with
pycurl, I built my own timer into a callback.
--
Aahz (a...@pythoncraft.com) <
Stephen Hansen wrote:
Question: how can I do that? Use another threaded class? Is there
some other way?
First of all, thanks for answer!
What OS? Does this have to be OS-independant?
Err, sorry -- this is Linux/UNIX only.
Are you using more then
one transport/SSLClient in your pro
On Fri, Feb 5, 2010 at 9:23 AM, mk wrote:
> On paramiko mailing list I got the suggestion to build a timer and then
> quit this by myself:
>
> The timeout option in connect() is for the socket, not for the entire
>> operation. You are connected, so that timeout is no longe
On Fri, 05 Feb 2010 18:23:09 +0100, mk wrote:
[...]
> On paramiko mailing list I got the suggestion to build a timer and then
> quit this by myself:
>
>> The timeout option in connect() is for the socket, not for the entire
>> operation. You are connected, so that timeout
regards only a socket timeout, not further
stages of connection negotiation, so it doesn't work there.
On paramiko mailing list I got the suggestion to build a timer and then
quit this by myself:
The timeout option in connect() is for the socket, not for the entire
operation. You are conn
? A curses-based interfase?
--
Gabriel Genellina
My app is purely console based. I just don't want the console to lock
up (on Windows using time.sleep(x) causes the console to become
unresponsive until the timer is done), and I want people to be able to
CTRL+C to stop the sc
; > > Do you have a GUI? A curses-based interfase?
>
> > > --
> > > Gabriel Genellina
>
> > My app is purely console based. I just don't want the console to lock
> > up (on Windows using time.sleep(x) causes the console to become
> > unresponsive unt
En Fri, 29 Jan 2010 14:39:31 -0300, MRAB
escribió:
JohnnyFive wrote:
My app is purely console based. I just don't want the console to lock
up (on Windows using time.sleep(x) causes the console to become
unresponsive until the timer is done), and I want people to be able to
CTRL+C to
t; --
> > Gabriel Genellina
>
> My app is purely console based. I just don't want the console to lock
> up (on Windows using time.sleep(x) causes the console to become
> unresponsive until the timer is done), and I want people to be able to
> CTRL+C to stop the script if nee
ly console based. I just don't want the console to lock
up (on Windows using time.sleep(x) causes the console to become
unresponsive until the timer is done), and I want people to be able to
CTRL+C to stop the script if need be (which can't be done if it's
unresponsive!).
Thanks.
Which
purely console based. I just don't want the console to lock
up (on Windows using time.sleep(x) causes the console to become
unresponsive until the timer is done), and I want people to be able to
CTRL+C to stop the script if need be (which can't be done if it's
unresponsive!).
Thanks.
En Thu, 28 Jan 2010 20:34:22 -0300, JohnnyFive
escribió:
I need help with something that is probably fairly simple, but i'm
having a heck of a time getting it work.
Basically, I need my program to sleep for a certain amount of time,
but I don't want the console to become unresponsive while s
in program to run it's course
again.
I tried using a Timer, threads, etc, but I really can't figure it out.
What am I missing?
I can post what I have, but I don't want to get caught up on how i'm
doing it wrong (as none of it works), but rather the correct way to do
it
data from the main
>> thread without lock?
>
> stop() is part of the Timer-interface, and tas it's not mentioned to be
> unsafe in the docs you can just call it. It might be that it internally
> calls some threadsafe means of communication (Event, Lock).
>
Thought I sh
mk wrote:
> Frank Millman wrote:
>
>> class Timer(threading.Thread):
>> def __init__(self):
>> threading.Thread.__init__(self)
>> self.event = threading.Event()
>>
>> def run(self):
>> while not self.event.is_set()
Frank Millman wrote:
class Timer(threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
self.event = threading.Event()
def run(self):
while not self.event.is_set():
""" The things I wan
repeating timer every n minutes?
Ashish Vyas wrote:
> Dear All
>
> How do I write a code that gets executed 'every x' minutes?
>
[...]
> Regards,
> Ashish Vyas
Here is one way -
import threading
class Timer(threading.Thread):
def __init__(self):
th
Ashish Vyas wrote:
> Dear All
>
> How do I write a code that gets executed 'every x' minutes?
>
[...]
> Regards,
> Ashish Vyas
Here is one way -
import threading
class Timer(threading.Thread):
def __init__(self):
threading.Thread.__ini
VYAS ASHISH M-NTB837 wrote:
You might want to start a thread with a continues loop that primarily
sleeps (time.sleep) but wakes up at regular intervals and executes what
needs to be.
--
MPH
http://blog.dcuktec.com
'If consumed, best digested with added seasoning to own preference.'
--
http://
I use the wx.Timer for this:
import wx
timer = wx.Timer(self, -1)
# update gui every 1/4 second (250ms)
timer.Start(250)
Bind(wx.EVT_TIMER, OnUpdateValues)
In the above I'm running the OnUpdateValues function every 250ms.
Regards,
Wesley Brooks
2009/10/29 VYAS ASHISH M-NTB837
>
&g
Dear All
How do I write a code that gets executed 'every x' minutes?
I know how to do it 'after x' minutes, I do the following:
def doAtTimerFire():
""" The things I want to do 'after x' minutes go here. """
And then from main code, I do this:
tmr = threading.Timer(timeInSeconds,
Vamsikrishna wrote:
How to place the timer in python code.
I want calculate the python script execution time.
ex : Start Timer
: End Timer
Execution Time : End Timer - Start Timer.
How can we write the python code for this.
Help would be appreciable.
Thanks in Advance.
Vamsi
Vamsikrishna wrote:
How to place the timer in python code.
timeit ...
it's in the standard library:
http://docs.python.org/library/timeit.html
Cheers,
Ju
--
Whomever controls the press, owns history
-- Johann Gutenberg
--
http://mail.python.org/mailman/listinfo/python-list
How to place the timer in python code.
I want calculate the python script execution time.
ex : Start Timer
: End Timer
Execution Time : End Timer - Start Timer.
How can we write the python code for this.
Help would be appreciable.
Thanks in Advance.
Vamsi
--
http://mail.python.org
2009/6/30 superpollo :
> Paul Moore wrote:
>>
>> 2009/6/30 superpollo :
>>
>>> Paul Moore wrote:
>>>
>>>> For a non-toy example, you'd probably create an Event object, use your
>>>> timer to set the event, and your while lo
i would like to thank each and everyone for help given, and aplologise
for my inaccuracy.
thanks 10**3!
superchicken
--
http://mail.python.org/mailman/listinfo/python-list
Paul Moore wrote:
2009/6/30 superpollo :
Paul Moore wrote:
For a non-toy example, you'd probably create an Event object, use your
timer to set the event, and your while loop would do while
event.is_set(), so the problem wouldn't arise.
thank u paul. if u dont mind, would you give
superpollo writes:
> so why this does not work?
>
> 1 #!/usr/bin/python
> 2
> 3 import threading
> 4
> 5 e = threading.Event()
> 6 t = threading.Timer(3.0, e.set())
The second arg needs to be a callable - maybe you meant e.set without
the brackets?
--
http:
Paul Moore wrote:
2009/6/30 superpollo :
Paul Moore wrote:
For a non-toy example, you'd probably create an Event object, use your
timer to set the event, and your while loop would do while
event.is_set(), so the problem wouldn't arise.
thank u paul. if u dont mind, would you give
it should, shouldn't it?), then exits after 3
sec but with error:
Nice try, but you're passing *the result of calling e.set*
as the function parameter to Timer. And the result of calling
e.set () is None. So you're passing None as the function-to-call.
Which it does. And then.
, sys.exit)
7 t.start()
8 while True:
9 print "stuff ",
The Timer runs the function in another thread. Perhaps sys.exit is just
exiting that thread and not the main thread.
sys.exit raises a SystemExit exception, which will get handled in the
new thread (where it won'
2009/6/30 superpollo :
> Paul Moore wrote:
>> For a non-toy example, you'd probably create an Event object, use your
>> timer to set the event, and your while loop would do while
>> event.is_set(), so the problem wouldn't arise.
>
> thank u paul. if u dont mi
, sys.exit)
7 t.start()
8 while True:
9 print "stuff ",
The Timer runs the function in another thread. Perhaps sys.exit is just
exiting that thread and not the main thread.
sys.exit raises a SystemExit exception, which will get handled in the
new thread (where it won'
eading
>> Â Â Â 4 import sys
>> Â Â Â 5
>> Â Â Â 6 t = threading.Timer(3.0, sys.exit)
>> Â Â Â 7 t.start()
>> Â Â Â 8 while True:
>> Â Â Â 9 Â Â print "stuff ",
>>
> The Timer runs the function in another thread. Perhaps sys.exit is just
> exiting
()
8 while True:
9 print "stuff ",
The Timer runs the function in another thread. Perhaps sys.exit is just
exiting that thread and not the main thread.
--
http://mail.python.org/mailman/listinfo/python-list
hi folks.
the follwing shoud print 'stuff' for 3 seconds and then stop. why it
does not work? (prints stuff forever)
1 #!/usr/bin/python
2
3 import threading
4 import sys
5
6 t = threading.Timer(3.0, sys.exit)
7 t.start()
8 while True:
9
On Dec 25, 7:24Â am, Steven D'Aprano wrote:
> On Wed, 24 Dec 2008 16:59:23 -0800, Mike Driscoll wrote:
> >> Among my questions are:
> >> """ A little thread we've added""" seems to be an isolated string. It
> >> does not seem to be doing anything there, almost like a comment. Why is
> >> it there?
On Wed, 24 Dec 2008 16:59:23 -0800, Mike Driscoll wrote:
>> Among my questions are:
>> """ A little thread we've added""" seems to be an isolated string. It
>> does not seem to be doing anything there, almost like a comment. Why is
>> it there?
>
>
> That's what some people call a doc string.
En Wed, 24 Dec 2008 20:56:45 -0200, Sponge Nebson
escribió:
This is my first post. Nice to meet you all! Could one of you walk me
through this code?
It is from David McNab and Alex Tweedly's tutorial on timers and
threads, which can be found here:
Mike Driscoll has already answered your quest
On Dec 24, 4:56Â pm, Sponge Nebson wrote:
> Hello all,
>
> This is my first post. Nice to meet you all! Could one of you walk me
> through this code?
>
> Â Â def myThread(*argtuple):
> Â Â Â Â """
> Â Â Â Â A little thread we've added
> Â Â Â Â """
> Â Â Â Â print "myThread: entered"
> Â Â Â Â q = a
Hello all,
This is my first post. Nice to meet you all! Could one of you walk me
through this code?
def myThread(*argtuple):
"""
A little thread we've added
"""
print "myThread: entered"
q = argtuple[0]
print "myThread: starting loop"
x =
甜瓜 wrote:
> ^_^ Oh! I did not read the document for time.clock before,
> and supposed it was same with time.time().
>
> Thank you very much.
>
If you are using wxPython then you should probably see whether a wxTimer
would meet your needs.
regards
Steve
--
Steve Holden+1 571 484 6266
On Wed, Oct 29, 2008 at 4:22 PM, Tim Roberts <[EMAIL PROTECTED]> wrote:
> I'm not sure you understood what he was saying. time.time() and
> time.clock() can both be used for elapsed timing, but because of a fluke of
> implementation, time.time() is more precise on Linux, and time.clock() is
> more
"" <[EMAIL PROTECTED]> wrote:
>2008/10/29 James Mills <[EMAIL PROTECTED]>:
>> On Wed, Oct 29, 2008 at 12:14 PM, <[EMAIL PROTECTED]> wrote:
>>> I use python2.5 in WindowsXP. If using time.time() as timer, it seems
>>
>> On t
^_^ Oh! I did not read the document for time.clock before,
and supposed it was same with time.time().
Thank you very much.
ShenLei
--
http://mail.python.org/mailman/listinfo/python-list
2008/10/29 甜瓜 <[EMAIL PROTECTED]>:
> 2008/10/29 James Mills <[EMAIL PROTECTED]>:
>> On Wed, Oct 29, 2008 at 12:14 PM, 甜瓜 <[EMAIL PROTECTED]> wrote:
>>> I use python2.5 in WindowsXP. If using time.time() as timer, it seems
>>
>> On the win32 p
2008/10/29 James Mills <[EMAIL PROTECTED]>:
> On Wed, Oct 29, 2008 at 12:14 PM, 甜瓜 <[EMAIL PROTECTED]> wrote:
>> I use python2.5 in WindowsXP. If using time.time() as timer, it seems
>
> On the win32 platform should you not
> be using time.clock vs. time.time
On Wed, Oct 29, 2008 at 12:14 PM, 甜瓜 <[EMAIL PROTECTED]> wrote:
> I use python2.5 in WindowsXP. If using time.time() as timer, it seems
On the win32 platform should you not
be using time.clock vs. time.time ?
--JamesMills
--
--
-- "Problems are solved by method"
--
htt
Howdy,
I use python2.5 in WindowsXP. If using time.time() as timer, it seems
the maximum precision is about 10-12ms. Maybe this is caused by
the time slice defined in process scheduler. However, in my project,
I have to get timer percision up to 1ms. What should I do? Do I have
to call Win32 API
Hi Justin,
Does Professor Battersea know you're using his gmail account? *wink*
On Wed, 13 Aug 2008 23:16:12 -0400, Prof. William Battersea wrote:
> I'd like a class method to fire every n seconds.
>
> I tried this:
>
> class Timed:
> def.__init__(self)
On 14 Aug 2008, William Battersea wrote:
> Both run once and end. I'm obviously missing something here.
That's how both ('sched' and threading.Timer) of the them work.
Depending on what you're doing, your toolkit/framework (Twisted, GTK,
etc) might have a better solution. Or
http://www.gossamer-t
I'd like a class method to fire every n seconds.
I tried this:
class Timed:
def.__init__(self):
self.t = Timer(3, self.dothing)
def.start(self):
self.t.start()
def.dothing(self):
print "Doing Thing"
s = new Timed()
s.start()
And:
class Sch
There is a module called sched in the standard Python library
<http://docs.python.org/lib/module-sched.html>
/Jean Brouwers
John Dann wrote:
> I need what I'd call (in .Net) a timer, ie I need to run a function eg
> every 2 seconds - it doesn't need to be millisec accu
> I need what I'd call (in .Net) a timer, ie I need to run a function eg
> every 2 seconds - it doesn't need to be millisec accurate but it would
> be nice if it wasn't eg every 4 seconds or something.
>
> Rather surprisingly, Core Python (Chun) doesn't se
1 - 100 of 168 matches
Mail list logo