Re: Timer runs only once.

2016-11-30 Thread vnthmanoharan
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): > > print("hello world") > > self.startTimer

Re: Timer runs only once.

2016-11-30 Thread Ian Kelly
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") >> self.startTimer() >> >> def startTi

Re: Timer runs only once.

2016-11-30 Thread siva gnanam
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): > self.t1 = Timer(5, self.foo) > sel

Re: Timer runs only once.

2016-11-30 Thread siva gnanam
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: > > def __init__(self): > se

Re: Timer

2010-03-17 Thread Peter Otten
Sam Bull wrote: > 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

Re: Timer

2010-02-18 Thread Victor Subervi
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

Re: Timer

2010-02-17 Thread Stephen Hansen
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

Re: Timer

2010-02-17 Thread Dotan Cohen
> 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

Re: Timer

2010-02-17 Thread Gabriel
On Wed, Feb 17, 2010 at 3:14 PM, Victor Subervi wrote: > Hi; > I have the following css: > > .splash { position:absolute; left:0px; top:0px; z-index:2 } > .page { position:absolute; left:0px; top:0px; z-index:1 } > .text {  font-family: Arial, Helvetica, sans-serif; font-size: 16px; > text-decora

Re: timer for a function

2010-02-11 Thread Aahz
In article , mk wrote: > >self.conobj = paramiko.SSHClient() > >self.conobj.connect(self.ip, username=self.username, >key_filename=self.sshprivkey, port=self.port, timeout=opts.timeout) > >2. very slow SSH host that is hanging for 30+ seconds on key exchange. > >The timeout in the options regard

Re: timer for a function

2010-02-09 Thread mk
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

Re: timer for a function

2010-02-08 Thread Stephen Hansen
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 longer relevant. >> You woul

Re: timer for a function

2010-02-08 Thread Steven D'Aprano
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 is no longer relevant. >

Re: timer

2009-06-30 Thread Paul Moore
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 loop would do while event.is_set(), so the problem wouldn't arise. >>> >>

Re: timer

2009-06-30 Thread superpollo
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

Re: timer

2009-06-30 Thread 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 loop would do while event.is_set(), so the problem wouldn't arise. thank u paul. if u dont mind, would you give me a more

Re: timer

2009-06-30 Thread Paul Rudin
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:

Re: timer

2009-06-30 Thread 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 loop would do while event.is_set(), so the problem wouldn't arise. thank u paul. if u dont mind, would you give me a more

Re: timer

2009-06-30 Thread Tim Golden
superpollo wrote: 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()) 7 t.start() 8 while not e.isSet(): 9 print "stuff ", it does *NOT* print (but it should,

Re: timer

2009-06-30 Thread superpollo
Paul Moore wrote: 2009/6/29 MRAB : superpollo wrote: 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)

Re: timer

2009-06-30 Thread Paul Moore
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 me a more detailed pi

Re: timer

2009-06-30 Thread superpollo
Paul Moore wrote: 2009/6/29 MRAB : superpollo wrote: 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)

Re: timer

2009-06-29 Thread Paul Moore
2009/6/29 MRAB : > superpollo wrote: >> >> 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

Re: timer

2009-06-29 Thread MRAB
superpollo wrote: 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 whi

Re: Timer Usage

2006-11-06 Thread Grant Edwards
On 2006-11-06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I'm planning to do C++ development together with Python on > Linux. I understand that Linux allows only one timer per > process. Does Python use the Linux timer? No. > If so, how do I use the timer without interfering with Python? --