TerminalView
Posted
#1
(In Topic #1466)
Regular

I finallly found some time to revisit something I was working on last year: Running bash and python scripts inside a terminalview. Thanks to some help from Bruce Steers, I have a simple working app. Nothing fancy but I am using it to experiment with terminalview. One scenario is a button on the form that will launch a specific script. If I hit the button again and the script is already running I get a "terminal already in use" error. Looking at the wiki, I don't see how I would check if the terminal is being used. I guess I could kill the script and restart but I'm not sure if that's a good idea. Can someone point me in the right direction?
Posted
Banned
/comp/gb/process - Gambas Documentation
eg..
Then Process.State can be checked
Note if you are running bash you cannot tell if the bash shell is running a process. from the TerminalViews perspective bash is the process that is always running until you exit.
It's only possible if the terminal is running commands directly and not using a bash shell.
Posted
Regular

BruceSteers said
use the Process of the Shell or Exec commmand.
/comp/gb/process - Gambas Documentation
eg..
Then Process.State can be checked
Note if you are running bash you cannot tell if the bash shell is running a process. from the TerminalViews perspective bash is the process that is always running until you exit.
It's only possible if the terminal is running commands directly and not using a bash shell.
Thanks Bruce. I'll try this with the terminalview snippet you gave me last year.
1 guest and 0 members have just viewed this.





