MCPcopy Create free account
hub / github.com/dtmilano/AndroidViewClient / _ns

Function _ns

src/com/dtmilano/android/common.py:45–56  ·  view source on GitHub ↗

NOTICE: this is using a non-greedy (or minimal) regex @type name: str @param name: the name used to tag the expression @type greedy: bool @param greedy: Whether the regex is greedy or not @return: Returns a named string regex (only non-whitespace characters allowed)

(name, greedy=False)

Source from the content-addressed store, hash-verified

43
44
45def _ns(name, greedy=False):
46 '''
47 NOTICE: this is using a non-greedy (or minimal) regex
48
49 @type name: str
50 @param name: the name used to tag the expression
51 @type greedy: bool
52 @param greedy: Whether the regex is greedy or not
53
54 @return: Returns a named string regex (only non-whitespace characters allowed)
55 '''
56 return '(?P<%s>\S+%s)' % (name, '' if greedy else '?')
57
58
59def obtainPxPy(m):

Callers 3

__splitAttrsMethod · 0.90
getWindowsMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected