Python Forum
I'm trying to create a GUI in Python which would accept a bash command
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I'm trying to create a GUI in Python which would accept a bash command
#1
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:
# 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)
it displays only text outputs omitting the graphics present.
Reply
#2
What do you mean by "graphics"? What kind of "graphics" output does the command produce? I don't know of any kind of streamed "graphics" output that would be universally recognized and displayed.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to accept only float number in QLineEdit input ism 5 28,496 Jul-06-2021, 05:23 PM
Last Post: deanhystad
  Class function does not create command button Heyjoe 2 2,294 Aug-22-2020, 08:06 PM
Last Post: Heyjoe

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020