thomasaaron
February 28th, 2007, 12:47 PM
Hey, guys.
I'd like be able to make a python/Tk text widget *seem* like a terminal emulator.
I need it to be able to perform two functions:
1. It has to display the results of a bash script running in the background in the text widget. This much I've figured out a way to do. I just have the bash script output to a file and then read the file into the text widget.
2. This is what I'm unsure of. I also need for it to be intereactive. For example, if the bash script requests user input (i.e. echo What is your name?; read name), this should be done through the text widget as well. In the OS module there are pipe / popen methods. But those don't seem to be what I need. How would you go about creating an interactive environment with BASH using a Python widget?
Thanks,
Tom
I'd like be able to make a python/Tk text widget *seem* like a terminal emulator.
I need it to be able to perform two functions:
1. It has to display the results of a bash script running in the background in the text widget. This much I've figured out a way to do. I just have the bash script output to a file and then read the file into the text widget.
2. This is what I'm unsure of. I also need for it to be intereactive. For example, if the bash script requests user input (i.e. echo What is your name?; read name), this should be done through the text widget as well. In the OS module there are pipe / popen methods. But those don't seem to be what I need. How would you go about creating an interactive environment with BASH using a Python widget?
Thanks,
Tom