Re: dogtail How to add delay between events ?
- From: Zack Cerza <zcerza redhat com>
- To: Gautam Ravi <gautam ravichandran gmail com>
- Cc: dogtail-list gnome org
- Subject: Re: dogtail How to add delay between events ?
- Date: Wed, 20 Jun 2007 17:13:45 -0400
Gautam Ravi wrote:
Hi all,
I am using dogtail to demonstrate my GUI application. I have a python
script written for that.
All I want to do is to add delay between two events.
I know it is something to do with sleep(). Can any one tell me the exact
way to do this?
Thanks in advance.
Out of curiosity, between what two events are you needing a delay?
The best way to do it is:
from dogtail.utils import doDelay
[code and stuff]
doDelay(x) # where x is the delay in seconds.
The advantage of doDelay() is that if you do:
from dogtail.config import config
config.debugSleep = True
then your delays will show up in the debug log. Also, there is a default
global delay that is defined as config.defaultDelay, which doDelay()
will use if you don't pass it an explicit delay.
I hope I used the word 'delay' enough in that paragraph ;)
Zack
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]