Pexpect 2.4 is only available at Pypi. Both the homepage of
pexpect(http://www.noah.org/wiki/Pexpect) and download page
(http://sourceforge.net/projects/pexpect/files/) are outdated. The
repository on Github (http://github.com/noahspurrier/pexpect/) has
been removed.
I ever contacted the author(n
I have been looking for pexpect. The links I find like
http://pexpect.sourceforge.net all end up at
http://www.noah.org/wiki/Pexpect which produces a 404 not
found problem.
Does someone know the current location?
--
Antoon Pardon
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
Google is your friend:
http://sourceforge.net/projects/pexpect/
http://sourceforge.net/projects/pexpect/files/pexpect/Release%202.3/pexpect-2.3.tar.gz/download
Best regards,
Javier
2009/10/13 Antoon Pardon apar...@forel.vub.ac.be:
I have been looking for pexpect. The links I find
Antoon Pardon wrote:
I have been looking for pexpect. The links I find like
http://pexpect.sourceforge.net all end up at
http://www.noah.org/wiki/Pexpect which produces a 404 not
found problem.
Does someone know the current location?
maybe they removed the distribution so you may use
Sean DiZazzo wrote:
On Sep 24, 4:37 pm, Dave Angel da...@ieee.org wrote:
snip
Why not just use the subprocess module? It's built into the Windows
distribution, and doesn't need cygwin.
DaveA
Can subprocess pass things like passwords to running processes like
pexpect can
things like passwords to running processes like
pexpect can?
~Sean
I don't know what pexpect is/was capable of, since it's not apparently part
of the current Python distributions. I thought it had the ability to fork
or spawn a child process, with pipes connected.
Anyway, subprocess can
Hello,
I downloaded and installed the pexpect module and wrote a script. All is
well and good, but the script proved to be pretty useful and now I was asked
to run it as a scheduled task up on a server to run periodically. I was
intending on simply packaging it up with Py2Exe and moving
Kevin Holleran wrote:
Hello,
I downloaded and installed the pexpect module and wrote a script. All is
well and good, but the script proved to be pretty useful and now I was asked
to run it as a scheduled task up on a server to run periodically. I was
intending on simply packaging it up
On Sep 24, 4:37 pm, Dave Angel da...@ieee.org wrote:
Kevin Holleran wrote:
Hello,
I downloaded and installed the pexpect module and wrote a script. All is
well and good, but the script proved to be pretty useful and now I was asked
to run it as a scheduled task up on a server to run
On Sep 4, 7:11 pm, Mathew Oakes mathew.oa...@memechine.org wrote:
Is there anything that can be done to make pexpect spawns send unicode lines?
In this example they are just middot characters, but this process
needs to be able to handle languages in other character sets.
spokentext
Is there anything that can be done to make pexpect spawns send unicode lines?
In this example they are just middot characters, but this process
needs to be able to handle languages in other character sets.
spokentext = u'Nation . Search the FOX Nation . czars \xb7 Health care
\xb7 town
Hi,
I found that pexpect is available only for linux.
But we need to port to QNX, Is pexpect is available? If yes, where can I
find it.
Thanks,
--
http://mail.python.org/mailman/listinfo/python-list
Hey,
I'm trying to execute a command over a remore server using pexpect
+
url = 'ssh internalserver'
res = pexpect.spawn(url)
print '1'
res.expect('.*ssword:')
print '2'
res.sendline('mypasswd')
print '3'
res.sendline('ls -aslh')
+
What I want to do is to send
Hussein B hubaghd...@gmail.com (HB) wrote:
HB Hey,
HB I'm trying to execute a command over a remore server using pexpect
HB +
HB url = 'ssh internalserver'
HB res = pexpect.spawn(url)
HB print '1'
HB res.expect('.*ssword:')
HB print '2'
HB res.sendline('mypasswd')
HB print '3'
HB
Piet van Oostrum p...@cs.uu.nl (PvO) wrote:
[snip]
PvO You can also consider using paramiko instead of pexpect.
[snip]
chan = t.open_session()
chan.exec_command('cat')
chan.send('abcdefghijklmn\n')
In a real program it is better to use sendall here, as send may decide
to send only part
I have been trying to use pexpect and I am failing with
pexpect.TIMEOUT for all my attempts. In order to troubleshoot, I
decided to go with simplest possible one.
Here is my ssh to localhost:
[21:29:14 senthil]$ssh localhost -l senthil
sent...@localhost's password:
sent...@ubuntu:~$
And here
Phoe6 orsent...@gmail.com wrote:
I have been trying to use pexpect and I am failing with
pexpect.TIMEOUT for all my attempts. In order to troubleshoot, I
decided to go with simplest possible one.
[...]
Can someone help me what I am doing wrong here?
Why is not working for such a simple
On Jun 8, 10:19 pm, R. David Murray rdmur...@bitdance.com wrote:
I would suggest using the 'setlog' method of child to get
more debugging information from pexpect. I've found that the
best way to diagnose the source of a timeout.
setlog method seems to be deprecated and 'not allowed' too
Hi,
I'm trying to use something like pexpect.interact() but I want to save
all my inputs and save all outputs from the process (/bin/sh Linux).
The main goal is to record all sequence of commands and responses in
order to automatically generate pexpect script.
My script is like below so far
Hello,
I have a strange problem with pexpect:
$ cat test.py
#!/usr/bin/python
import pexpect
child = pexpect.spawn(./test.pl)
while True:
try:
line = raw_input()
except EOFError:
break
child.sendline(line)
print child.readline().rstrip(\r\n)
child.close
On Tue, 3 Mar 2009 14:37:20 -0800 (PST), Chris Pella skipad...@gmail.com
wrote:
Has anybody had success getting pexpect to work well on solaris 10
(x86)? I am trying to do some test automation which involves
controlling some other processes. Soon after I spawn the process I am
trying
Has anybody had success getting pexpect to work well on solaris 10
(x86)? I am trying to do some test automation which involves
controlling some other processes. Soon after I spawn the process I am
trying to control a message comes up on stdout telling me that a tty
has been closed
I'm trying to build a small Python app in Eclipse under Fedora 10.
I have the following code:
import os
import sys
import pexpect
child = pexpect.spawn('/bin/bash')
child.interact()
When I run it in Eclipse, I get:
Traceback (most recent call last):
File /home/xxx/workspace/FixPermissions
On Jan 30, 11:03 am, Linuxguy123 linuxguy...@gmail.com wrote:
I'm trying to build a small Python app in Eclipse under Fedora 10.
I have the following code:
import os
import sys
import pexpect
child = pexpect.spawn('/bin/bash')
child.interact()
When I run it in Eclipse, I get
am using the following code:
#!/usr/bin/env python
import pexpect
import sys
child = pexpect.spawn('telnet 192.168.1.254')
fout = file('mylog.txt','w')
child.logfile = fout
child.expect('sername : ')
child.sendline('Administrator')
child.expect('assword : ')
child.sendline('')
child.expect
I am using the following code:
#!/usr/bin/env python
import pexpect
import sys
child = pexpect.spawn('telnet 192.168.1.254')
fout = file('mylog.txt','w')
child.logfile = fout
child.expect('sername : ')
child.sendline('Administrator')
child.expect('assword
pexpect: I use
it to send the router's logs to my server. The obvious difference
between my script and yours is that instead of sendline, I used send and
an explicit carriage return.
kid.expect('Username :')
kid.send('admin\r\n')
I think this is a result of a similar problem, but I
I don't seem to be able to figure out how to get the exit values of
commands executed with pexpect reliably. Here's first with regular shell:
hei...@ubuntu:~$ true; echo $?
0
Let's try with pexpect. Below is the program:
---CLIP---
import sys, pexpect
cmd = true
print 'cmd=', cmd
child
I don't seem to be able to figure out how to get the exit values of
commands executed with pexpect reliably. Here's first with regular shell:
[EMAIL PROTECTED]:~$ true; echo $?
0
Let's try with pexpect. Below is the program:
---CLIP---
import sys, pexpect
cmd = true
print 'cmd=', cmd
child
On Tue, 30 Sep 2008 20:48:12 -0700, Anh Khuong wrote:
I am using pexpect and I want to send output of pexpet to both stdout
and log file concurrently. Anybody know a solution for it please let me
know.
One way is to create a file-like object that forked the output to stdout
and the logfile
Hi all,
I am using pexpect and I want to send output of pexpet to both stdout and log
file concurrently.
Anybody know a solution for it please let me know.
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
On Sep 30, 8:48 pm, Anh Khuong [EMAIL PROTECTED] wrote:
Hi all,
I am using pexpect and I want to send output of pexpet to both stdout and log
file concurrently.
Anybody know a solution for it please let me know.
spawn class takes a 'logfile' parameter:
__init__(self, command, args
On Sep 9, 4:01 pm, Sriram Rajan [EMAIL PROTECTED] wrote:
For some reason, Using pexpect causes my output to echo twice when I
connect from my MAC Darwin (10.4) to Linux (CentOS release 5 ):
The program:
-
#!/usr/bin/python
# Automatic scp to remote host
# Input 1
Hi,
Wanting to use pexpect on windows too, I ran into wexpect.
http://sage.math.washington.edu/home/goreckc/sage/wexpect/
I haven't given it a try yet. Does anyone have experience with that?
Almar
2008/9/13 nntpman68 [EMAIL PROTECTED]
Hi,
[EMAIL PROTECTED] wrote:
On Sep 10, 7:01 pm, Sean
Hi,
[EMAIL PROTECTED] wrote:
On Sep 10, 7:01 pm, Sean DiZazzo [EMAIL PROTECTED] wrote:
I am using windows and for reason it wont let me use pexpect even tho
I have CYGWIN installed
I get the following error
Traceback (most recent call last):
File new.py, line 1, in module
import
'
---
--
does this look right?
I am using windows and for reason it wont let me use pexpect even tho
I have CYGWIN installed
I get the following error
Traceback (most recent call last):
File new.py, line 1, in module
import ssh_session
File C:\Python25\lib\ssh_session.py, line
Hey , I need to SSH into a server .. (10.8.42.38) using pexpect the
username is 'admin' and password is 'abc123' so far i have the
following code
import pexpect
import sys
import time
import os
foo = pexpect.spawn('ssh [EMAIL PROTECTED]')
ssh_newKey = 'Are you sure you want to continue
On Sep 10, 6:04 pm, [EMAIL PROTECTED] wrote:
Hey , I need to SSH into a server .. (10.8.42.38) using pexpect the
username is 'admin' and password is 'abc123' so far i have the
following code
import pexpect
import sys
import time
import os
foo = pexpect.spawn('ssh [EMAIL PROTECTED
For some reason, Using pexpect causes my output to echo twice when I
connect from my MAC Darwin (10.4) to Linux (CentOS release 5 ):
The program:
-
#!/usr/bin/python
# Automatic scp to remote host
# Input 1 : filename
# Input 2 : destination folder
# Input 3 : hostname
import
On 2008-06-04, Mallikarjun Melagiri [EMAIL PROTECTED] wrote:
Hi Noah,
I am new to python. I'm trying to use pexpect.
Following is my problem definition:
I should have a script on my machine A, which
should 'ssh' to machine B and from there it shud
Hi Noah,
I am new to python. I'm trying to use pexpect.
Following is my problem definition:
I should have a script on my machine A, which
should 'ssh' to machine B and from there it shud copy a file to machine
C thru 'scp'.
Please help me.
Regards
I am noticing that pexpect kills any child that it is spawned when the
parent is terminated using SIGINT (e.g Ctrl-C on the shell), but not
when it is killed by SIGKILL (e.g 'kill -9' on the parent process).
Here is a quick demo (tried on Linux 2.6.9 kernel):
#!/usr/local/bin/python
import
Many thanks !
This is what I did
for mytunnel.py :
I use pexpect like this
tunnel_command = '''bash -c ssh -N -R 60011:localhost:60002
[EMAIL PROTECTED] '''
com=echo \+str(ssh_tunnel.pid)+\ pids
...
time.sleep(172800)
in the bash script which calls mytunnel.py :
./mytunnel.py ${USERN
Hi
I am using pexpect to do ssh tunneling and to open a vnc server (jobs on
a grid cluster). When the job is canceled, these 2 processes remain on
the worker node (they are detached), so I have to kill them (using a
trap command in the bash script of the job) but I need the pid of each
Karim Bernardet [EMAIL PROTECTED] wrote:
Hi
I am using pexpect to do ssh tunneling and to open a vnc server (jobs on
a grid cluster). When the job is canceled, these 2 processes remain on
the worker node (they are detached), so I have to kill them (using a
trap command in the bash
On May 5, 7:18 am, Karim Bernardet [EMAIL PROTECTED] wrote:
ssh_tunnel = pexpect.spawn (tunnel_command % globals())
...
print ssh_tunnel.pid
but ssh_tunnel is not the pid of the ssh tunnel
Is there a way to get it using pexpect ?
You will notice that you can't get this information even
funciton.
OK. Hope my note helped.
I looked for pexpect doucment on http://www.noah.org/wiki/Pexpect, but
the documentaiton link appear to be broken. Could you recommend
another site?
As I recall it, the online documentation is just the documentation
from the Python module itself, HTML-formatted
Jorgen,
Thanks for your reply.
The ssh function is just a small part of what I would like to
accomplish. And yes, chk is undefined, I was trying to figure out why
control was not being returned from the sshcon funciton.
I looked for pexpect doucment on http://www.noah.org/wiki/Pexpect
On Fri, 28 Mar 2008 08:12:36 -0700 (PDT), Paul Lemelle [EMAIL PROTECTED]
wrote:
I am trying separate a script that users pexpect into
various functions within the same expect session. The
problem is that the function does not return control
back Main.
I do not understand what that sentence
I am trying separate a script that users pexpect into
various functions within the same expect session. The
problem is that the function does not return control
back Main. Any insight into this issue would be
greatly appreciated. Below is sample code of the
problem.
Thanks,
Paul
I am trying separate a script that users pexpect into
various functions within the same expect session. The
problem is that the function does not return control
back Main. Any insight into this issue would be
greatly appreciated. Below is sample code of the
problem.
Thanks,
Paul
=user_B
child =pexpect.spawn('su user_B')
child.expect('Password:')
child.sendline(passwd)
child.expect('$')
child.close()
Maybe it's the easiest pexpect program.Sometimes ,it work well,it
switch to user_B successfully .But after i type the command exit to
switch back to user_A,execute
I'm new to python
I want to write a simple script to switch user,for example,from user_A
to user_B.
This my codes:
#!/usr/bin/python
import pexpect
import os
passwd=user_B
child = pexpect.spawn('su user_B')
child.expect('Password:')
child.sendline(passwd)
child.expect('$')
child.close()
Maybe
:')
child.sendline(passwd)
child.expect('$')
child.close()
Maybe it's the easiest pexpect program.Sometimes ,it work well,it
switch to user_B successfully .But after i type the command exit to
switch back to user_A,execute the python script again,it can't work,do
nothing or just waiting.Why
Dear All,
I'm trying to write a script which will check the progress of my
MD-simulations on a cluster.
So far I've been able to ssh to each node and retrieve the data I was
looking for by sending the command top -c -n 1|grep mdrun with
pexpect. Unfortunately the string I'm looking
xterm, to update
title bar.
2) Also, how come I don't get 0 or 2(excuting ls command exit code)
from result.split('\r\n')[0] or result.split('\r\n')[1] ?
I don't think your expect worked fine to capture the desired output.
This is what I get: import pexpect
child=pexpect.spawn('ssh [EMAIL
Hi,My aim is to connect to a remote machine and execute commands at the remote machine.. such as ifconfig...i found out a module named pexpect if anyone can help me out in thatThanking youRegards, ---ViNOJ DAViS---Regards
shell_cmd = 'ls -l | grep mytest.log'
child = pexpect.spawn ('ssh [EMAIL PROTECTED]')
I think you can give the ssh command an option to execute a file
remotely. That way, one command would be enough.
--
http://mail.python.org/mailman/listinfo/python-list
I don't get 0 or 2(excuting ls command exit code)
from result.split('\r\n')[0] or result.split('\r\n')[1]. I have to
try another method.
Regular shell ssh login:
[EMAIL PROTECTED] ~]$ ssh [EMAIL PROTECTED]
Last login: Mon Dec 31 20:51:09 2007 from com1
[EMAIL PROTECTED] ~]$
Pexpect Login
. Can someone provide little insight on this?
import pexpect
child=pexpect.spawn('ssh [EMAIL PROTECTED] ls mytest.log /dev/null
21; echo $?')
child.expect([pexpect.TIMEOUT, '\$'])
Traceback (most recent call last):
File stdin, line 1, in ?
File /usr/lib/python2.4/site-packages
I am using pexpect with Cgi to ssh into remote machine,Whenever i run a script which does ssh using pexpect from the linux terminal it gives me the correct result, but when i call the script using commands module from the cgi program i am getting the following error.(0, '(256, \'Traceback (most
I need to ssh into a remote machine and check if mytest.log file is
there. I have setup ssh keys to handle login authentications.
How do I determine if mytest.log is there by using Pexpect. What I
have done so far is spawned a child for ssh.
1) Now what do I do to execute shell_cmd(ls and grep
In article [EMAIL PROTECTED],
crybaby [EMAIL PROTECTED] wrote:
I need to ssh into a remote machine and check if mytest.log file is
there. I have setup ssh keys to handle login authentications.
How do I determine if mytest.log is there by using Pexpect. What I
have done so far is spawned a child
1) what are these characters:
\x1b]0;
~\x07\x1b[?1034h
in line '\x1b]0;[EMAIL PROTECTED]:[EMAIL PROTECTED] ~]'?
2) Also, how come I don't get 0 or 2(excuting ls command exit code)
from result.split('\r\n')[0] or result.split('\r\n')[1] ?
This is what I get:
import pexpect
child=pexpect.spawn
= '.*#' to detect the prompt expect. Thank you for you'r
help !
Vive Python et TK :-D
I have another probleme, not directly from Pexpect() function. There
is my code :
from Tkinter import *
from sys import *
import tkMessageBox
from tkColorChooser import askcolor
from tkFileDialog
Yes it's work ! :-D
I use prompt = '.*#' to detect the prompt expect. Thank you for you'r
help !
Vive Python et TK :-D
--
http://mail.python.org/mailman/listinfo/python-list
On 25 déc, 09:41, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Yes it's work ! :-D
I use prompt = '.*#' to detect the prompt expect. Thank you for you'r
help !
Vive Python et TK :-D
I have another probleme, not directly from Pexpect() function. There
is my code :
from Tkinter import *
from
Pexpect() function. There
is my code :
from Tkinter import *
from sys import *
import tkMessageBox
from tkColorChooser import askcolor
from tkFileDialog import askopenfilename
import tkFileDialog as Selector
from os.path import exists, join
from os import pathsep
import pexpect
import
Pexpect() function. There
is my code :
from Tkinter import *
from sys import *
import tkMessageBox
from tkColorChooser import askcolor
from tkFileDialog import askopenfilename
import tkFileDialog as Selector
from os.path import exists, join
from os import pathsep
import pexpect
import
!
Vive Python et TK :-D
I have another probleme, not directly from Pexpect() function. There
is my code :
from Tkinter import *
from sys import *
import tkMessageBox
from tkColorChooser import askcolor
from tkFileDialog import askopenfilename
import tkFileDialog as Selector
hello,
I'm new in Python and i would like to use Pexpect to execute a root
command (i want to mount via a Pyhton script a drive)
so that's my script for the moment :
from os import *
import pexpect
import os
cmd1=su -
cmd2=mount -o loop /home/user/my.iso /mnt/disk
pwd=mypassword
child
On Dec 24, 6:06 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
hello,
I'm new in Python and i would like to use Pexpect to execute a root
command (i want to mount via a Pyhton script a drive)
so that's my script for the moment :
from os import *
import pexpect
import os
cmd1=su -
cmd2
On Dec 24, 2007, at 7:06 PM, [EMAIL PROTECTED] wrote:
hello,
I'm new in Python and i would like to use Pexpect to execute a root
command (i want to mount via a Pyhton script a drive)
so that's my script for the moment :
from os import *
import pexpect
import os
cmd1=su -
cmd2=mount
Hi,
I'm using the pexpect module to spawn some processes in a testing
environment. pexpect uses, internally, os.execv. What I need to do is
valgrind python and get memory leaks from the spawned children
(assuming that python doesn't leak :)).
Here's a simple testcase:
===
leak.c
import sys,os
import pexpect
source_file= 'sourcefile.txt'
user='username'
ip='00.00.00.00'
desti_path='/home/jai/………'
password='bond007'
cmd ='scp'+' '+source_file+' '+user+'@'+ip+':'+desti_path
try:
foo = pexpect.spawn(cmd)
foo.expect('.ssword
cmd ='scp'+' '+source_file+' '+user+'@'+ip+':'+desti_path
You might wanna try to login with a public/private key pair, then scp
won't ask for a password.
--
http://mail.python.org/mailman/listinfo/python-list
I am trying to write a multi-threaded program and use pexpect along
with it. All works fine until I try to close the connection handle.
That thread keeps waiting until the connection handle closes. It
actually never comes out of that command(connection_handle.close()).
If I manually kill it using
Hello all,
So I'm setting up a script that runs when CVS wants to connect to an ext type
server by setting CVS_RSH to my script so I can log in with a password. IE
CVS_RSH=/etc/projects/blah.py. Which runs when I type say cvs -d:ext:[EMAIL
PROTECTED]:/cvsroot co module. I need this because of
Kevin Erickson wrote:
On Jun 30, 5:50 pm, Kevin Erickson [EMAIL PROTECTED] wrote:
#Begin Code
import sys
import pexpect
def GetServerData(self):
foo = pexpect.spawn('scp [EMAIL PROTECTED]:/home/config/
role{/file1,/files/file2,/files/file3} /tmp
Hello,
I am attempting to use pexpect in python to copy files from a server
using scp; the copy works however exceptions are thrown and it exits
unsuccessfully. Below is the a sample code and the error:
#Begin Code
import sys
import pexpect
def GetServerData(self):
foo
On Jun 30, 5:50 pm, Kevin Erickson [EMAIL PROTECTED] wrote:
Hello,
I am attempting to use pexpect in python to copy files from a server
using scp; the copy works however exceptions are thrown and it exits
unsuccessfully. Below is the a sample code and the error:
#Begin Code
import sys
Hi All,
I have a python program that downloads database backups from a remote server,
and tries to replace the local database with the downloaded backup. The
database is a PostgreSQL server and my program calls the pg_restore command
with the aid of the wonderful pexpect module. Everything
at the last part (3) of the
password request).
I don't have any errors when trying to operate the script without the
last password.
Here is the script:
import pexpect
import sys
import re
import os
import getopt
PROMPT = \$|\%|\
class SSH:
def __init__(self, user, password, host
Gil == Gil H [EMAIL PROTECTED] writes:
class SSH:
def __init__(self, user, password, host):
self.child = pexpect.spawn(ssh [EMAIL PROTECTED]%(user,
host))
Try adding the following line here
self.child.logfile = sys.stdout
That should give you some clue.
On 4 Apr, 15:14, Ganesan Rajagopal [EMAIL PROTECTED] wrote:
Gil == Gil H [EMAIL PROTECTED] writes:
classSSH:
def __init__(self, user, password, host):
self.child =pexpect.spawn([EMAIL PROTECTED]%(user, host))
Try adding the following line here
On Feb 21, 11:15 pm, [EMAIL PROTECTED] wrote:
On Feb 21, 6:13 pm, [EMAIL PROTECTED] wrote:
I have apexpectscript to walk through a cisco terminal server and I
was hoping to get some help with this regex because I really suck at
it.
This is the code:
index =
On Feb 23, 8:46 am, amadain [EMAIL PROTECTED] wrote:
On Feb 21, 11:15 pm, [EMAIL PROTECTED] wrote:
On Feb 21, 6:13 pm, [EMAIL PROTECTED] wrote:
I have apexpectscript to walk through a cisco terminal server and I
was hoping to get some help with this regex because I really suck at
On Feb 23, 8:53 am, amadain [EMAIL PROTECTED] wrote:
On Feb 23, 8:46 am, amadain [EMAIL PROTECTED] wrote:
On Feb 21, 11:15 pm, [EMAIL PROTECTED] wrote:
On Feb 21, 6:13 pm, [EMAIL PROTECTED] wrote:
I have apexpectscript to walk through a cisco terminal server and I
was hoping to
I have a pexpect script to walk through a cisco terminal server and I
was hoping to get some help with this regex because I really suck at
it.
This is the code:
index = s.expect(['login: ', pexpect.EOF, pexpect.TIMEOUT])
if index == 0:
m = re.search('((#.+\r\n){20,25
On Feb 21, 6:13 pm, [EMAIL PROTECTED] wrote:
I have a pexpect script to walk through a cisco terminal server and I
was hoping to get some help with this regex because I really suck at
it.
This is the code:
index = s.expect(['login: ', pexpect.EOF, pexpect.TIMEOUT])
if index
I am trying to essentially fork a rsync process from my python script
and I am having some issues with the forking part. My program basically
checks to see if I need to transfer a file and if it does, it calls the
transferItem() function below:
def transferItem(filelist):
hostname, passwd,
I have studied pexpect example sshls.py and ssh_session.py, trying to carry several linux command by ssh. for example.
1. ssh connect one remotehost,
2. cd /tmp directory
3. mkdir myname
4. touch output.log
But I found these examplesonly can carry one command.who knows how to carry sereval linux
I am developing a small appl. for a student to code some video. I am
able to control mplayer in slave mode through IDLE using pexpect. In my
app though I want to display it in a particular frame and have buttons
control rw ff, stop, play etc... I am having two problems. One how do I
frame
Hi all,
For my first script, I'm trying to build a program to set up a vpn
connection. I'm using pexpect to handle this, but I can't get it to work.
The sendline() is causing troubles. I tested it in the interactive promt,
with these results:
import pexpect
child = pexpect.spawn(vpnc-connect
Ok, somebody helped my and found with help(child.sendline) that the
number (7) is the number of characters from my password.
Still there doesn't seem to be that anything strange is happening. With
the logfile printed out, I found that child.expect places a 0 behind the
next rule. Is this always
Jurian Sluiman wrote:
Ok, somebody helped my and found with help(child.sendline) that the
number (7) is the number of characters from my password.
Still there doesn't seem to be that anything strange is happening. With
the logfile printed out, I found that child.expect places a 0 behind the
Hi all,
I'm trying to build a program to set up a vpn connection. I'm using pexpect to handle this, but I can't get it to work.
The sendline() is causing troubles. I tested it in the interactive promt, with these results:
import pexpect
child = pexpect.spawn(vpnc-connect tudelft
the
authentication in pexpect. I had added 'www' to user 'admin', and
could su to root from the command line, so I don't think that was it.
Maybe it was a timing error, ie pexpect fired off the password too soon
or too late, or something in the apache environment that just
disallowed becoming root for security
line and the share is made. But when I try to have
the web server execute it, I continually get a password failure. I'm
positive the password is correct.
Any ideas?
~Sean D
~~~test.py
#! /usr/bin/env python
import commands, os, P, pexpect
sharename = sys.argv[1]
root
Well, first i don't think it is a good idea to have the python script
tu su to root, but for it to work, i think (Totally unsure about that)
www has to be in group wheel to be able to su.
Maybe sudo can help here.
--
http://mail.python.org/mailman/listinfo/python-list
101 - 200 of 229 matches
Mail list logo