From: Tony B. <bie...@ho...> - 2003-04-19 16:30:16
|
Can't seem to capture output from a command line execution. Here's what I'm trying: sub OnIORedir { my $this = shift; $ubhdir = "/mnt/data/stable3/"; $ubhasm = "ubhasm"; $ubhdb = "ubhdb"; $ubhcatalog = "ubhcatalog"; $ubh = "ubh"; chdir $ubhdir; my $process = Wx::Process->new( $this ); $this->{PROCESS} = $process; $process->Redirect; Wx::ExecuteArgs( [$^X, main::filename( $ubhdir . $ubhasm )], 0, $process ); while( $process->IsInputAvailable ) { my $stream = $process->GetInputStream; sysread($stream, $buffer, 1); my $value = <$buffer>; $this->output->AppendText( $value ) if defined $value; Wx::LogMessage( $value ) if defined $value; # sysread($stream , $buffer , 1) ; # print "<$buffer>\n" ; sleep(1); } } Any thoughts? _________________________________________________________________ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail |