← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #260990]: After import a module, how to use the function defined in that module?

 

Question #260990 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/260990

RaiMan proposed the following answer:
according to the Python import rules you either use:

import MyFunctions
print MyFunctions.Add(5,6)

or

from MyFunctions import *
print Add(5,6)

the 2nd version has the risk to silently overwrite an already existing
name Add in the global namespace.

Not related to your problem:
When working with Sikuli scripting in Python/Jython you should always put 
from sikuli import *
at the beginning of submodules (just to be prepared)

About your intermittent problem situations I cannot tell you anything.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.