Package dogtail :: Module path :: Class SearchPath
[hide private]
[frames] | no frames]

Class SearchPath

source code

object --+
         |
        SearchPath

Class used by the recording framework (and for more verbose script logging) for identifying nodes in a persistent way, independent of the style of script being written.

Implemented as a list of (predicate, isRecursive) pairs, giving the 'best' way to find the Accessible wrapped by a Node, starting at the root and applying each search in turn.

This is somewhat analagous to an absolute path in a filesystem, except that some of searches may be recursive, rather than just searching direct children.

FIXME: try to ensure uniqueness FIXME: need some heuristics to get 'good' searches, whatever that means

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__str__(self)
str(x)
source code
 
__eq__(self, other) source code
 
append(self, predicate, isRecursive) source code
 
__iter__(self) source code
 
length(self) source code
 
makeScriptMethodCall(self)
Used by the recording system.
source code
 
getRelativePath(self, other)
Given another SearchPath instance, if the other is 'below' this one, return a SearchPath that describes how to reach it relative to this one (a copy of the second part of the list).
source code
 
getPrefix(self, n)
Get the first n components of this instance as a new instance
source code
 
getPredicate(self, i) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

makeScriptMethodCall(self)

source code 

Used by the recording system.

Generate the Python source code that will carry out this search.

getRelativePath(self, other)

source code 

Given another SearchPath instance, if the other is 'below' this one, return a SearchPath that describes how to reach it relative to this one (a copy of the second part of the list). Otherwise return None.