Nov-12-2023, 05:19 PM
I'm trying to create a GUI in Python which would accept a bash command like this
python OK21.py
and displayed all the outputs of this command including any graphics.
If I run from command line this
python OK21.py
it does so, but when trying to do it from GUI like here:
it displays only text outputs omitting the graphics present.
python OK21.py
and displayed all the outputs of this command including any graphics.
If I run from command line this
python OK21.py
it does so, but when trying to do it from GUI like here:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
# import required modules import os import pyautogui # prompts message on screen and gets the command # value in val variable value = pyautogui.prompt( "Enter Shell Command" ) # executes the command and returns # the output in stream variable stream = os.popen(value) # reads the output from stream variable out = stream.read() pyautogui.alert(out) |