Your "program" is a Perl function. Can it be an independent script? If so, you could spawn a thread to act as a bridge.
use IPC::Open3 qw( open3 ); sub run_child { my ($widget) = @_; my $pid = open3( my $to_child, # Autovivified when false. my $fr_child, # Autovivified when false. undef, # Same as $fr_child when false. $somecommand, @args ); while (<$fr_child>) { my $end_is_visible = ( $yview == 1.0 ); $text->insert('end', $_); $w->see('end') if $end_is_visible; } waitpid($pid, 0); }
And I have no idea how Tk will react to threads, especially when calling a $widget method from a separate thread.
In reply to Re: Please suggest a non-forking way to do this (OS: windows)
by ikegami
in thread Please suggest a non-forking way to do this (OS: windows)
by cranky
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |