From: <RGi...@a1...> - 2002-03-14 10:02:02
|
IO-Tty v1.00 and Expect v1.14 are now available from CPAN (when the packages have propagated) as well as from the project homepage at http://sourceforge.net/projects/expectperl/. From the READMEs: IO::Tty and IO::Pty provide an interface to pseudo tty's To build this distribution, run perl Makefile.PL make make test make install ALL BRAND NEW!! I finally took the time to give the pty-allocation part a complete overhaul. Thanks to openssh and Xemacs teams for providing me with a lot of inspiration through their own pty-allocation codes. I also removed the spawn code, as this doesn't fit thematically in here. Look into 'try' or 'test.pl' to see how it is done by hand. Problems with ackquiring a controlling terminal should also be fixed and propagating terminal size changes is now supported. Please read the manpages, there is a lot of new stuff (e.g. IO::Tty::Constant). Please note that pty creation is very system-dependend. I am beginning to get an overview, but there are a *lot* of different systems out there. If you have problems on your system, please send me (<RGi...@cp...>) the output of a manual installation ('perl Makefile.PL; make; make test;') and I'll see what I can deduce from it. Supported systems include Linux, Solaris, AIX, OSF, *BSD, IRIX, HP-UX and finally Windows (under the Cygwin environment, see http://sources.redhat.com/cygwin/). See the IO::Tty manpage for a detailed list. I also compiled an overview table, find it in the project pages document manager at SourceForge (http://sourceforge.net/projects/expectperl/). Sorry, ActiveState Perl is not supported, basically because there are no pseudo-terminals under Windows. If somebody from ActiveState reads this and wants to work on it, please contact me, maybe we could use the equivalent of pipes to emulate the behaviour. If it's working on your system, please send me a short note with details (version number, distribution, etc. 'uname -a' is a good start) so I can get an overview. Thanks! See the ChangeLog and the docs for details. Oh, and many thanks to all testers, without their support this project would still be limited to a few systems that I have access to. Thanks also to SourceForge (http://sf.net) who is hosting this and many other projects, their services have made development and support a real pleasure. If you intend to donate something to the Open Source cause, think about lending them a machine for their compile farm! Roland <RGi...@cp...> 2002-03-12 Expect.pm v1.14 =============== Expect requires the latest version of IO::Tty, also available from CPAN. IO::Stty has become optional but I'd suggest you also install it. If you use the highly recommended CPAN module, there is a Bundle::Expect available that installs everything for you. If you prefer manual installation, the usual perl Makefile.PL make make test make install should work. I finally started a testsuite for Expect, but it doesn't really test anything deeper right now. The problem is to find some external program to use for generating reproducible output that is available across all platforms. Luckily, we can always use perl itself... Contributions to the testsuite are of course welcome. Note that IO::Tty is very system-dependend. It has been extensively reworked and tested, but there still may be systems that have problems. The Perl Expect module was inspired more by the functionality of Tcl/Expect than any previous Expect-like tool such as Comm.pl or chat2.pl. The Tcl version of Expect is a creation of Don Libes (li...@ni...) and can be found at http://expect.nist.gov/. Don has written an excellent in-depth tutorial of Tcl/Expect, which is _Exploring Expect_. It is the O'Reilly book with the monkey on the front. Don has several references to other articles on the Expect web page. I try to stay as close to Tcl/Expect in interface and semantics as possible (so I can refer questions to the Tcl/Expect docu). Suggestions for improvement are always welcome. [Latest rumours have it that Don plans a rewrite of Expect as a stand-alone library that can be easily embedded into various scripting languages.] There is now a FAQ section in the pod, complete with examples, so please let me know if there's something you'd like to see answered there that isn't. There are two mailing lists available, expectperl-announce and expectperl-discuss, at http://lists.sourceforge.net/lists/listinfo/expectperl-announce and http://lists.sourceforge.net/lists/listinfo/expectperl-discuss From the Changes file: ====================== ! changed tests to check out pty behaviour (max. string length) + added various FAQ entries + added autoflush(1) to log_file + split 'new' and 'spawn' to be able to set slave pty params via stty before actually spawning the program + added raw_pty() + added notransfer() + added print_log_file(), send() now no longer prints to log file or stdout. ! spawn() now synchronizes child and parent, so exec errors are reported. + timeout handlers now also can exp_continue + added 'raw_pty' option, also setting master to raw if isatty() + added and corrected test for exit status; got rid of Test.pm ! use 'set_raw' instead of stty("raw"); IO::Stty now optional + updated docs & FAQs; explained how terminal sizes and SIGWINCH should be propagated ! fixed bug in log_file, parameter now gets set to undef. ! fixed select in interconnect, may return -1 if interrupted by signal. Thanks to everybody who wrote to me, either with bug reports or enhancement suggestions! Roland Giersig (maintainer of Expect.pm, IO::Tty, IO::Stty, Tie::Persistent) RGi...@cp... 2002-03-12 -- RGi...@cp... |