[spe.pycs.net] terminal emulator functions

www.stani.be s_t_a_n_i at yahoo.com
Tue Dec 16 15:16:56 CET 2003


About terminal emulator functions in
wxMDIParentFrame.py:
The purpose of these routines is to run programs in a
non blocking way outside spe.  This gives the
opportunity to continue editing while you see the
ouput when the program is still running. Programs run
faster that way than inside spe. Beside some programs
(eg containing wxPython code) will crash when runned
inside spe.
Now I made in the paths three entries for the terminal
emulator functions: 'open', 'run' and 'run & exit' I
use now a dictionary with a 'dir' and 'file' key for
the string interpolation, see console for an example. 


ANY VOLUNTEER FOR...
Now I need two things from one of you: the linux code
for the three functions, where the default is xterm
for linux, and a list of predefined paths (eg "cd
\"%(dir)s\"; /usr/X11R6/bin/xterm &"%arg") for open,
run and run&exit. I hope I'm clear. Paul, thanks for
the links to the man pages. Of course it is usefull.
However I prefer if you linux users give me the code,
because for me I can only than do the theory and not
test the code I wrote. If one of you send me the code
than I'm sure it works.

a) menuToolsConsole
This routine allows the user to play with argument
values.
Thanks Rasjid for the patch, I changed now the
function into:

    def menuToolsConsole(self,event):
        arg = {'dir'  :
os.path.dirname(self.GetActiveChild().fileName),
               'file' :
self.GetActiveChild().fileName}
        terminal = self.get('Terminal')
        if terminal==DEFAULT:
            if sys.platform=='win32':
                os.system('start "Spe console - Press
Ctrl+Break to stop" /D"%(dir)s"'%arg)
            else:
                os.system("cd \"%(dir)s\";
/usr/X11R6/bin/xterm &"%arg)
        else:
            os.system(terminal%arg)
            
b) menuToolsRunExternal
This routine should run a program externally in a
terminal emulator, displays its output and not exit at
the end of 

the program. Please send me 

c) menuToolsRunExternalExit
Same as above, but exists at the end of the program.

__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/



More information about the Spe-user mailing list