Capture output from 'run' function

Asked by Jacob Facius on 2019-07-23

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:
Sikuli Edit question
Assignee:
No assignee Edit question
Last query:
2019-07-23
Last reply:
2019-07-30
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.