PyKDE : Can I embed a Konsole?

A

Adrian Casey

I'd like to embed a Konsole inside my PyQt-based application. I'm using the
pexpect module extensively and would dearly like to add the ability to read
and write to Konsole sessions from my application (i.e. send commands and
read the output send to Konsole). I would also like to process the output
stream in the normal 'expect' manner and send appropriate input based on
decisions made.

I've seen examples of embeding the KHTML widget but have not yet seen the
same done with a Konsole. Has anyone done it? Is it possible?

My application has the ability to create accounts, set passwords and run
ad-hoc commands across multiple systems - generic 'expect' type
functionality. The ability to connect the expect stream to a Konsole and
thereby monitor the interaction with the remote systems would be very
handy. Further, the ability to switch to 'interactive' mode when
exceptions are raised would allow the user to assume 'manual pilot'
operation during unexpected error conditions.

From the shell, I can use dcop to create new Konsole sessions within
existing Konsole windows. This is not the ideal solution as it does not
appear possible to connect a 'pexpect' session to a Konsole thus launched.
Of course, those Konsoles are also external to my application. Not ideal.

Regards.
Adrian Casey.
Alice Springs Linux User Group
http://www.aslug.org.au

If you've ever used expect, be sure the take a look at pexpect. It can be
found at http://pexpect.sourceforge.net
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top