Question #232183 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/232183
Status: Open => Answered
RaiMan proposed the following answer:
uups sorry, my fault ;-)
def getValue( text ):
m = re.match("[^0-9]*([0-9]*)", text) # the value text excluding fraction
try:
return int(m.group(1)) # returns the found value as integer
except:
print "could not extract number:", text
return -1 # returns -1 if any problems
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.
_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help : https://help.launchpad.net/ListHelp