← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #670562]: how to pass an argument to an imported function in a sikuli script

 

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

    Status: Open => Answered

Roman Podolyan proposed the following answer:
Hmmm... To my best knowledge import is not a function but a statement,
and you import not function, but a module or submodule.

You need to define a function within module, like

mod123.py
======
def function123(a):
    # do something with a
======

and then call the function in the module where you import

======
import mod123
function123(49)
======

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