My program is a text editor for bash scripts. For the run option I need to obtain all the commands typed in the textbox and execute them as if they were an entire script (the option of writing the string in a file and then execute it is also possible). Also, I need to pass some arguments (a string in the entry box), and obtain stderr and stdout if the user wants it (checkboxes).
My program looks like this:
I know how to obtain data from all graphic components, my big problem is that I'm not sure what to do: subprocess.call, subprocess.popen, os.system, etc. There are a lot of options. I need to use just one command whatever they write on the text box: pipes, simple commands, argument printing, etc.
It is desirable too that nothing is shown in my console.
Thank you for helping! Every idea is welcome!
I'm using Ubuntu.