← Back to team overview

sikuli-driver team mailing list archive

[Question #185864]: Unable to run sikuli executable from terminal

 

New question #185864 on Sikuli:
https://answers.launchpad.net/sikuli/+question/185864

I created a python file (demo4.py)  to run a sikuli executable (demo4.skl), create a log of all the outputs, email it to me and save it in a file. The entire python file is listed at the bottom below. 


What's of interest is this line of code in the python which is supposed to run the sikuli executable (demo4.skl) but it is not doing it:

commands.getstatusoutput('Sikuli-IDE.app/Contents/MacOS/JavaApplicationStub executables/demo4.skl | grep -v "\\[sikuli\\]" >' + filename)

When I run the python on the terminal by typing: "python demo4.py", the only outputs I get is the print statements in the python file. No sikuli launches. So I tried running the executable directly on the terminal by typing: "Sikuli-IDE.app/Contents/MacOS/JavaApplicationStub executables/demo4.skl" but I get "No such file or directory." 

So I need help using the right commands to run sikuli executable on the terminal that also works from within the python file. I have "Sikuli-IDE" in the applications folder on mac osx. The python file is in a folder called "Scripts" containing a sub folder called executables which has "demo4.skl" residing in it and a "log" folder. Will definitely appreciate much help on this. Thanks in advance!


Below is the contents of demo4.py (python file):

*****BEGIN****

import commands
from time import gmtime, strftime

time = strftime("%m%d%H:%M:%S",gmtime())
filename = "./executables/logs/"+time+"demo4.txt"

print "###Starting Sikuli app and executing demo4 script\n\n"

commands.getstatusoutput('Sikuli-IDE.app/Contents/MacOS/JavaApplicationStub executables/demo4.skl | grep -v "\\[sikuli\\]" >' + filename)

print "\n\n###Done with demo4 script."

mailcommand = 'uuencode '+ filename + ' demo4_test_logs | mail -s "Demo4 Logs" winners@xxxxxxxxxxx'

commands.getstatusoutput(mailcommand)

print "\nDone emailing logs to winners@xxxxxxxxxxx"


***END***


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