how to run a command-line program from Perl/Tk (ExecuteCommand?)
- From: Will Parsons <oudeis@xxxxxxxxxxxxxxxx>
- Date: 26 Oct 2007 17:46:45 GMT
I have a suite of related programs, of which the one intended mainly for
end-user use is a graphical app using Perl/Tk; the other two are support
programs in straight Perl. I'd like to be able to run the Perl programs
from the graphical application with the output displayed in a window -
what's the best way of doing this?
I've looked at Tk::ExecuteCommand, but have my doubts that this is the
right way to go because so far it doesn't seem to work on the first
platform I've tried it on, i.e., FreeBSD 6.1. (I want this to work
cross-platform, including Windows and GNU/Linux, in addition to FreeBSD.)
For those who may not be familiar with it, FreeBSD has a ports system,
but since Tk::ExecuteCommand doesn't have a FreeBSD port, I downloaded
and built the module myself from CPAN. The "make" went OK, but running
"make test" showed the following output:
PERL_DL_NONLAZY=1 /usr/bin/perl "-Iblib/lib" "-Iblib/arch" test.pl
1..12
# Running under perl version 5.008008 for freebsd
# Current time local: Fri Oct 26 13:26:41 2007
# Current time GMT: Fri Oct 26 17:26:41 2007
# Using Test.pm version 1.25
ok 1
ok 2
ok 3
Proc::ProcessTable missing, can't kill sub-children. at \
blib/lib/Proc/Killfam.pm line 22.
ok 4
ok 5
ok 6
ok 7
ok 8
ok 9
ok 10
ok 11
ok 12
Adding "use Tk::ExecuteCommand;" to my application also results in a
message:
Proc::ProcessTable missing, can't kill sub-children. at \
/usr/local/lib/perl5/site_perl/5.8.8/Proc/Killfam.pm line 22.
and adding a minimal use using the Tk::ExecuteCommand documentation
example as a model doesn't work.
So, what's my best bet here - looking for a fix to Tk::ExecuteCommand,
or finding an alternate way of running my command-line programs inside
a graphical window (keeping in mind that I'm looking for a cross-
platform solution)? If the latter, can anyone suggest an outline of
how to do this?
- Will
.
- Follow-Ups:
- Prev by Date: Re: Grid geometry manager
- Next by Date: Re: how to run a command-line program from Perl/Tk (ExecuteCommand?)
- Previous by thread: a question about Text-Widget and grid
- Next by thread: Re: how to run a command-line program from Perl/Tk (ExecuteCommand?)
- Index(es):
Relevant Pages
|
|