I have an application, which allows both by GUI and CLI. Is there any option to make use of this CLI commands using python, so that i can automate the set of process for that application(i.e. replace the set of work with single click)
-
2"Is there any option....?" The answer is probably "yes", but the question is vague. What is the problem exactly?mzjn– mzjn2018-08-01 13:48:18 +00:00Commented Aug 1, 2018 at 13:48
-
instead of opening an application and doing some brainless work, what is the option (Eg: which python library / how to write a python script) , so that by double clicking on .exe file it should do all those process in the background.gowtham– gowtham2018-08-01 13:59:34 +00:00Commented Aug 1, 2018 at 13:59
Add a comment
|
1 Answer
Use subprocess
from subprocess import check_output
# check_output returns the output of the command
# note: date is a unix command, try something else if on windows
result = check_output('date', encoding='utf8')
print(result)