sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #13802
Re: [Question #210973]: Sikuli code organization / code reuse
Question #210973 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/210973
RaiMan proposed the following answer:
the correct usage is:
import sub
class usesSub:
def s1(self):
sub.doSomething()
or
from sub import *
class usesSub:
def s1(self):
doSomething()
In the second case all names from sub are taken in the global name space
which might lead to name clashes if there is no strict naming
convention.
So the first case is more robust with a little bit more to type.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.