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
Thanks 5 3393 xi*******@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/
--
Robert Kern rk***@ucsd.edu
"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
In article <ma*************************************@python.or g>,
Robert Kern <ro*********@gmail.com> wrote: xi*******@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/
On Thu, 06 Oct 2005 11:08:09 GMT, Cameron Laird <cl****@lairds.us> wrote: In article <ma*************************************@python.or g>, Robert Kern <ro*********@gmail.com> wrote:xi*******@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.
.... 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.
It depends. I do not feel /that/ advanced, but I've been bitten by pexpect's
limitations several times in several places.
.... which puts me in a weird position ;-) I /loathe/ the Tcl language, but I
have to admit that its expect functionality is far superior to Python's.
/Jorgen
--
// Jorgen Grahn <jgrahn@ Ph'nglui mglw'nafh Cthulhu
\X/ algonet.se> R'lyeh wgah'nagl fhtagn!
In article <sl************************@frailea.sa.invalid>,
Jorgen Grahn <jg*********@algonet.se> wrote:
On Thu, 06 Oct 2005 17:08:03 GMT, Cameron Laird <cl****@lairds.us> wrote: In article <sl************************@frailea.sa.invalid>, Jorgen Grahn <jg*********@algonet.se> wrote: . . .It depends. I do not feel /that/ advanced, but I've been bitten by pexpect's limitations several times in several places.
... which puts me in a weird position ;-) I /loathe/ the Tcl language, but I have to admit that its expect functionality is far superior to Python's. . . .
On to more constructive matters: what are you doing about Pexpect's limitations? Have the maintainers responded to you when you write? Are you tempted to compose enhancements for yourself?
There is hobby hacking, and there is work. I've encountered pexpect during
work, and haven't had the time and energy to look into it. I hereby
apologize to the pexpect developers. Not for whining, but for not helping
out.
/Jorgen
--
// Jorgen Grahn <jgrahn@ Ph'nglui mglw'nafh Cthulhu
\X/ algonet.se> R'lyeh wgah'nagl fhtagn! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Brandon J. Van Every |
last post by:
What's better about Ruby than Python? I'm sure there's something. What is
it?
This is not a troll. I'm language shopping and I want people's answers. I
don't know beans about Ruby or have...
|
by: svilen |
last post by:
hello again.
i'm now into using python instead of another language(s) for
describing structures of data, including names, structure,
type-checks, conversions, value-validations, metadata etc....
|
by: Fred Ma |
last post by:
Hello,
This is not a troll posting, and I've refrained from
asking because I've seen similar threads get all
nitter-nattery. But I really want to make a decision
on how best to invest my time....
|
by: David MacQuigg |
last post by:
I am starting a new thread so we can avoid some of the non-productive
argument following my earlier post "What is good about Prothon". At
Mr. Hahn's request, I will avoid using the name "Prothon"...
|
by: Vamsee Krishna Gomatam |
last post by:
Hello,
I'm having some problems understanding Regexps in Python. I want
to replace "<google>PHRASE</google>" with
"<a href=http://www.google.com/search?q=PHRASE>PHRASE</a>" in a block of
text....
|
by: Philippe C. Martin |
last post by:
Hi,
I am trying to change the data in a form field from python. The following
code does not crash but has no effect as if "form" is just a copy of the
original html form.
Must I recreate the...
|
by: Edward Diener No Spam |
last post by:
The definition of a component model I use below is a class which allows
properties, methods, and events in a structured way which can be
recognized, usually through some form of introspection...
|
by: Anton Mellit |
last post by:
Hi,
I am working on a Pari-Python module (see about GP/PARI at
http://pari.math.u-bordeaux.fr/). Similar project was started by
Stefane Fermigier 12 years ago (you can find a post about it on...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
| |