Re: Can Python replace TCL/Expect
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.python archive

Re: Can Python replace TCL/Expect

From: Cameron Laird <claird@lairds.us>
Date: Thu Oct 06 2005 - 13:08:09 CEST

In article <mailman.1583.1128579857.509.python-list@python.org>,
Robert Kern <robert.kern@gmail.com> wrote:
>xinchenvn@gmail.com wrote:
>> Hi
>>
>> I'm learning Python. I don't know whether Python can do something like
>> Expect can do. If yes, please show me how to do it.
>> I want to do something automatically: open connection to a ftp server,
>> get the welcome message on the screen (not in the packet). I can do it
>> easily with Expect but I still don't have any idea with Python.
>> If possible, can you introduce me some book or website that I can get
>> infor about automation programming with Python
>
>You'll probably want to take a look at pexpect:
>
> http://pexpect.sourceforge.net/
                        .
                        .
                        .
1. Yes.
2. While Pexpect indeed "can do something like Expect",
    it does NOT have all the facilities and polish of the
    latter.
3. But very, VERY few of Expect's users are aware of more
    than a handful of Expect's functions, let alone use them,
    so it's fair to say that Pexpect does everything Expect
    does, within the realm of ordinary use.
4. But it sort-of doesn't matter anyway, because, if the
    goal is (as appears in this case) to work with ftp,
    there are better ways to work, anyway <URL:
    http://phaseit.net/claird/comp.unix.programmer/ftp_automation.html >
    <URL: http://www.python.org/doc/current/lib/ftp-handler-objects.html >.
Received on Sat Oct 15 04:12:54 2005