Capture output from 'run' function

Asked by Jacob Facius

Sikuli has a global function 'run' that can execute commands on the command line. I was wondering if it was possible to capture the output of this command that is run. I am pretty sure through some testing that run returns the exit code of whatever was run, which makes a lot of sense. I am attempting to run a command line function though and I want to get its output.

Thanks!

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

Use the Python feature subprocess instead.

Can you help with this problem?

Provide an answer of your own, or ask Jacob Facius for more information if necessary.

To post a message you must log in.