← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #286612]: run .py file in sikuli

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
Not the appropriate solution for your problem.

Just tested on my Win10 - this works:

- having Python installed in C:\Python27
- having a hello.py in c:\Python\hello.py

# SikuliX script:
python = r"C:\Python27"
pyscript = r"C:\Python\hello.py"
cmd = "%s %s" % (python, pyscript)  
result = run(cmd)
print result

# script hello.py
print "hello world"

running the script you get as output in the IDE message area:
0
hello world

where the 1st line is the return code and the following lines are the
output produced by hello.py

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