2

Sikuli has its own function type for typing. Is there any way to invoke python (jython) function type? Module builtins can’t be imported. Of course I can use isinstance instead but I am just curious if it is possible to come outside Sikuli scope and invoke not “overridden”, python built-in type function. I use Sikuli r930.

#import builtins                         #ImportError: No module named builtins
findAll("1369036502514.png")
matches = getLastMatches()
print(isinstance(matches,Finder))        #returns TRUE
type("1369035684637.png",'hello world')  #types characters 
type('hello world again')                #types characters 
print(type(matches))                     #TypeError: type(): 1st arg can't be coerced to String

Running builtins.type results in failure too:

builtins.type(matches)
NameError: name 'builtins' is not defined

__builtins__.type(matches)
NameError: name '__builtins__' is not defined
Marcin Kowalczyk
  • 649
  • 6
  • 17
  • 1
    The answer can be found on this page (solved by RaiMan): https://bugs.launchpad.net/sikuli/+bug/794880 –  Nov 18 '13 at 13:28

1 Answers1

3

You can use matches.__class__.

Mark Cidade
  • 98,437
  • 31
  • 224
  • 236