From: <er...@er...> - 2006-12-19 10:52:30
|
> > Hi, > > I'm trying to make two processes run next to eachother: the first runs = a > linux command in the shell (can take quite some time) that writes thing= s > to > a file. The second process reads from that file at the same time in > intervals and puts the text line for line in a grid. > Hello What you need is a CPAN module called POE combined with the POE::Loop::Wx (the loop for wx that bridges POE and Wx). It will make it easier for you both to handle the shell command (POE::Wheel::Run) and to parse the file in non-blocking mode (yield an event that reads one or several lines at a time until EOF). You will then have a non blocking Wx application. You can have a look at the samples included in the POE::Loop::Wx module and on the http://poe.perl.org website. It may seem a little difficult at first sight but it's worth. Thanks Eriam |