Package dogtail :: Module utils
[hide private]
[frames] | no frames]

Module utils

source code

Various utilities

Authors: Ed Rousseau <rousseau@redhat.com>, Zack Cerza <zcerza@redhat.com, David Malcolm <dmalcolm@redhat.com>


Author: Ed Rousseau <rousseau@redhat.com>, Zack Cerza <zcerza@redhat.com, David Malcolm <dmalcolm@redhat.com>

Classes [hide private]
  Highlight
  Blinker
  Lock
A mutex implementation that uses atomicity of the mkdir operation in UNIX-like systems.
  GnomeShell
Utility class to help working with certain atributes of gnome-shell.
Functions [hide private]
 
screenshot(file='screenshot.png', timeStamp=True)
This function wraps the ImageMagick import command to take a screenshot.
source code
 
run(string, timeout=30, interval=0.5, desktop=None, dumb=False, appName='')
Runs an application.
source code
 
doDelay(delay=None)
Utility function to insert a delay (with logging and a configurable default delay)
source code
 
isA11yEnabled()
Checks if accessibility is enabled via DConf.
source code
 
bailBecauseA11yIsDisabled() source code
 
enableA11y(enable=True)
Enables accessibility via DConf.
source code
 
checkForA11y()
Checks if accessibility is enabled, and halts execution if it is not.
source code
 
checkForA11yInteractively()
Checks if accessibility is enabled, and presents a dialog prompting the user if it should be enabled if it is not already, then halts execution.
source code
Variables [hide private]
  a11yDConfKey = 'org.gnome.desktop.interface'
  __package__ = 'dogtail'
Function Details [hide private]

screenshot(file='screenshot.png', timeStamp=True)

source code 

This function wraps the ImageMagick import command to take a screenshot.

The file argument may be specified as 'foo', 'foo.png', or using any other extension that ImageMagick supports. PNG is the default.

By default, screenshot filenames are in the format of foo_YYYYMMDD-hhmmss.png . The timeStamp argument may be set to False to name the file foo.png.

run(string, timeout=30, interval=0.5, desktop=None, dumb=False, appName='')

source code 

Runs an application. [For simple command execution such as 'rm *', use os.popen() or os.system()] If dumb is omitted or is False, polls at interval seconds until the application is finished starting, or until timeout is reached. If dumb is True, returns when timeout is reached.