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.
# usually not OO, but simply procedural (workflow)
#from geraCPF import geraCPF
import geraCPF # just so
#class main(): # does not makes sense and the implementation is not
myApp = App("Chrome")
App.open("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
- - -
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: https://launchpad.net/~sikuli-driver
Post to : email@example.com
Unsubscribe : https://launchpad.net/~sikuli-driver
More help : https://help.launchpad.net/ListHelp