Using command line tools from a Python GUI

I think I have got quite some expriance in Python as well on scripts and GUI programming and have successfully finished some projects with some hundreds lines of code.

Now I like to build a GUI over openssl. So I need to call cli commands from the GUI or in a first step from a script. I searched the internet but did not found realy a small piece of sample code. I learned that subprocess should be one thing that may help. But did not get a real entry to that problem. Can anybody provide me with some lines of code to build on, or a link to better information than I found till now. The most I found was building command line tools with python, but that is not what I am looking for.
Thank you

Regards
Rainer

I think you are asking for the subprocess module.
Look at the subprocess.run() and hint, pass the command line as a list of args.

1 Like