Question #665137 on Sikuli changed:

    Status: Open => Answered

RaiMan proposed the following answer:
An OO approach does not depend on SikuliX, but only on the used language
(Python in this case) and your implementation concept.

... but I cannot see any OO concept, just the ide, to use a function
from some other imported script.

detailed comments:

# usually not OO, but simply procedural (workflow)

import shutil
#from geraCPF import geraCPF 
import geraCPF # just so

#class main(): # does not makes sense and the implementation is not

myApp = App("Chrome")"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe")
while not exists("1520001990649.png"):
   observe() # not sure, what this should do??? 
type(geraCPF.cpf_funcional_func()) # the function returns str() anyway
# you have to say module.function()
#exit() # not needed
- - -
import random
def cpf_funcional_func():
          n = [random.randrange(10) for i in xrange(9)]
          s = sum(x * y for x, y in zip(n, range(10, 1, -1)))
          d1 = 11 - s % 11
          if d1 >= 10:
              d1 = 0
          s = sum(x * y for x, y in zip(n, range(11, 1, -1)))
          d2 = 11 - s % 11
          if d2 >= 10:
              d2 = 0
          return "%d%d%d%d%d%d%d%d%d%d%d" % tuple(n)

I think, you have to step back, to rethink your concept.

Until now I cannot see any need to think in OO, it is just procedural
with using functions.

You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

Mailing list:
Post to     :
Unsubscribe :
More help   :

Reply via email to