Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How do i catch tty's output from X?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
lea0014
n00b
n00b


Joined: 09 Mar 2010
Posts: 24

PostPosted: Sun Jul 28, 2013 8:16 pm    Post subject: How do i catch tty's output from X? Reply with quote

Hi there, i'm writing some scripts and what i need is watch at realtime what is happening on tty1 from a terminal emulator or something like that. I just google it a lot, and it looks like there is no many ways to do it. I think that screen is not an option for me. So, is there any other option?
Back to top
View user's profile Send private message
vaxbrat
l33t
l33t


Joined: 05 Oct 2005
Posts: 731
Location: DC Burbs

PostPosted: Sun Jul 28, 2013 9:58 pm    Post subject: look at expect Reply with quote

There's a tcl package dev-tcltk/expect which can be used to handle serial or usb i/o interactions. Python has a pure python version of that lying around somewhere. I think there's one in the java framework somewhere too.

If you are doing any PyQt in your scripting, I wrote a generic logging class and ui file for use with interacting with a spawned QProcess, but I have never released it to the world. It's event driven and does a callback when input becomes available from the child.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum