Apr-22-2024, 06:54 AM
(Apr-22-2024, 04:30 AM)Rice23 Wrote: If one wishes to display the output from the command, how can it be obtained from the Popen call and displayed in a tkinter window?You can write
process = subprocess.run(['command', 'arg', 'arg'], capture_output=True, encoding='utf8') print(process.stdout) print(process.stderr)Then instead of printing the strings process.stdout and process.stderr, you can insert them in a Tkinter Text widget for example.
« We can solve any problem by introducing an extra level of indirection »