RE: pexpect with kadmin

2020-12-23 Thread Joseph L. Casale
> If you have windows 10 can you use Windows Subsystem for Linux (WSL) > to install one of the Linux distros and use that? Interesting idea, sadly I am too far past the deadline on this to go through the red tape needed to get that in place. Thanks, jlc -- https://mail.python.org/mailman/listi

Re: pexpect with kadmin

2020-12-23 Thread Barry Scott
> On 23 Dec 2020, at 04:04, Joseph L. Casale wrote: > > Anyone ever used pexpect with tooling like kadmin and have > insight into how to manage interacting with it? > > After setting up debug logging, I was able to adjust the expect > usage to get the input and output lo

pexpect with kadmin

2020-12-22 Thread Joseph L. Casale
Anyone ever used pexpect with tooling like kadmin and have insight into how to manage interacting with it? After setting up debug logging, I was able to adjust the expect usage to get the input and output logs to at least appear correct when setting a password for a principal, however even with a

Re: Pexpect

2017-01-07 Thread alister
On Fri, 06 Jan 2017 12:00:32 +1200, Iranna Mathapati wrote: > Hi Team, > > How to match latter(caps and small) ,numbers and # symbol in python > pexpect. > > > Thanks, > Iranna M Simple just write a small program -- New screensaver released: Curtain

Re: Pexpect

2017-01-06 Thread Cameron Simpson
On 06Jan2017 11:37, Joaquin Alzola wrote: Iranna Mathapati asked: How to match latter(caps and small) ,numbers and # symbol in python pexpect. With a .* Ugh. Please not. Expect() accepts a nongreedy regular expression. ".*" is the lazy "match absolutely anything"

Pexpect

2017-01-06 Thread Iranna Mathapati
Hi Team, How to match latter(caps and small) ,numbers and # symbol in python pexpect. Thanks, Iranna M -- https://mail.python.org/mailman/listinfo/python-list

RE: Pexpect

2017-01-06 Thread Joaquin Alzola
> How to match latter(caps and small) ,numbers and # symbol in python pexpect. With a .* child = pexpect.spawnu("ssh cbpapp@%s"% CBP[cust_cbp_server]) child.setecho(False) child.logfile = open("/opt/webapi/logs/delete_accountID.log", "w"

Pexpect

2017-01-06 Thread Iranna Mathapati
Hi Team, How to match latter(caps and small) ,numbers and # symbol in python pexpect. Thanks, Iranna M -- https://mail.python.org/mailman/listinfo/python-list

Pexpect

2016-12-10 Thread Iranna Mathapati
/systest/scripts/NAT/ATS_CLEAN_N9K.py", line 282, in check_prompt 2016-12-10T02:26:13: %aetest-ERROR: uut_con1.expect([r'wish to turn outlet'],timeout=30) 2016-12-10T02:26:13: %aetest-ERROR: File "/auto/n3k-qa/CODC/svanalin/pyats2/lib/python2.7/site-packages/pexpect/spawnbase

pexpect matching?

2015-11-16 Thread Didymus
Greetings, I have the following code: import pexpect child = pexpect.spawn('/bin/bash') i = child.expect_exact('bash-3.2$ ') child.sendline("rpm -q --queryformat '%{VERSION}\\n' glibc") i = child.expect (['2', '2.5', '

Re: help in pexpect multiprocessing

2015-11-16 Thread harirammanohar159
On Monday, 9 November 2015 18:07:36 UTC+5:30, hariramm...@gmail.com wrote: > Hi, > > I am using multiprocessing with pexpect, issue is whenever i call a function > which is having expect(), its throwing error which is genuine as multiple > threads are processing it same time (

Re: help in pexpect multiprocessing

2015-11-10 Thread Pablo Lucena
if condition == 'met': np = len(list1) p = multiprocessing.Pool(np) p.map(stop, [(ds) for ds in list1]) On Mon, Nov 9, 2015 at 7:37 AM, wrote: > Hi, > > I am using multiprocessing with pexpect, issue is whenever i call a > function which is havin

Re: help in pexpect multiprocessing

2015-11-10 Thread harirammanohar159
On Monday, 9 November 2015 18:07:36 UTC+5:30, hariramm...@gmail.com wrote: > Hi, > > I am using multiprocessing with pexpect, issue is whenever i call a function > which is having expect(), its throwing error which is genuine as multiple > threads are processing it same time (

Re: help in pexpect multiprocessing

2015-11-10 Thread harirammanohar159
On Monday, 9 November 2015 18:07:36 UTC+5:30, hariramm...@gmail.com wrote: > Hi, > > I am using multiprocessing with pexpect, issue is whenever i call a function > which is having expect(), its throwing error which is genuine as multiple > threads are processing it same time (

help in pexpect multiprocessing

2015-11-09 Thread harirammanohar159
Hi, I am using multiprocessing with pexpect, issue is whenever i call a function which is having expect(), its throwing error which is genuine as multiple threads are processing it same time (i/o prompt same time by multiple processes..so issues in picture...), so i want to use lock for that

Re: issue while doing pexpect ssh

2015-09-09 Thread harirammanohar159
Hey, its resolved by small tweak :) do child.sendline('logout') instead of child.logout() Thanks... -- https://mail.python.org/mailman/listinfo/python-list

Re: issue while doing pexpect ssh

2015-09-09 Thread harirammanohar159
On Tuesday, 8 September 2015 17:07:24 UTC+5:30, hariramm...@gmail.com wrote: > Some where i am missing simple logic :) > > = > child = pexpect.spawn('ssh hari@hostname') > child.logfile = sys.stdout > child.expect('hari\'s Password: ') > = > > getting error as follows: >

Re: issue while doing pexpect ssh

2015-09-09 Thread harirammanohar159
On Tuesday, 8 September 2015 17:07:24 UTC+5:30, hariramm...@gmail.com wrote: > Some where i am missing simple logic :) > > = > child = pexpect.spawn('ssh hari@hostname') > child.logfile = sys.stdout > child.expect('hari\'s Password: ') > = > > getting error as follows: >

Re: issue while doing pexpect ssh

2015-09-09 Thread Laura Creighton
>Hey All, > >I am able to achieve this using pxssh.. thank you for help... Great to hear it. Good luck with the crazies. Laura -- https://mail.python.org/mailman/listinfo/python-list

Re: issue while doing pexpect ssh

2015-09-09 Thread Laura Creighton
In a message of Wed, 09 Sep 2015 01:58:30 -0700, harirammanohar...@gmail.com wr ites: >Thank you for spawnu, now i got stuck with freezing issue similar to it is not >returing to the shell prompt...its on waiting...i had to press ctrl+c > >=== >child.sendline(password) >child.expect('-bas

Re: issue while doing pexpect ssh

2015-09-09 Thread harirammanohar159
On Tuesday, 8 September 2015 17:07:24 UTC+5:30, hariramm...@gmail.com wrote: > Some where i am missing simple logic :) > > = > child = pexpect.spawn('ssh hari@hostname') > child.logfile = sys.stdout > child.expect('hari\'s Password: ') > = > > getting error as follows: >

Re: issue while doing pexpect ssh

2015-09-09 Thread harirammanohar159
miko, it didnt worked for the same purpose (tried both sftp client and ssh client of paramiko module; finally while doing su getting the error as expecting tty terminal...) fabric will work but it is up to only python 2.7 so just i am trying to work out with pexpect whether it will be of any use or no

Re: issue while doing pexpect ssh

2015-09-08 Thread Laura Creighton
In a message of Tue, 08 Sep 2015 23:57:41 +1000, Chris Angelico writes: >On Tue, Sep 8, 2015 at 9:37 PM, wrote: >> Some where i am missing simple logic :) >> >> = >> child = pexpect.spawn('ssh hari@hostname') >> child.logfile = sys.stdout >> child.expect('hari\'s Password: ') >> = >>

Re: issue while doing pexpect ssh

2015-09-08 Thread jmp
On 09/08/2015 03:57 PM, Chris Angelico wrote: On Tue, Sep 8, 2015 at 9:37 PM, wrote: Some where i am missing simple logic :) = child = pexpect.spawn('ssh hari@hostname') child.logfile = sys.stdout child.expect('hari\'s Password: ') = getting error as follows: child.e

Re: issue while doing pexpect ssh

2015-09-08 Thread Chris Angelico
On Tue, Sep 8, 2015 at 9:37 PM, wrote: > Some where i am missing simple logic :) > > = > child = pexpect.spawn('ssh hari@hostname') > child.logfile = sys.stdout > child.expect('hari\'s Password: ') > = > > getting error as follows: > > child.expect('hari\'s Password: ') >

Re: issue while doing pexpect ssh

2015-09-08 Thread Laura Creighton
In a message of Tue, 08 Sep 2015 04:37:09 -0700, harirammanohar...@gmail.com wr ites: >Some where i am missing simple logic :) > >= >child = pexpect.spawn('ssh hari@hostname') >child.logfile = sys.stdout >child.expect('hari\'s Password: ') >= > >getting error as follows: > >

issue while doing pexpect ssh

2015-09-08 Thread harirammanohar159
Some where i am missing simple logic :) = child = pexpect.spawn('ssh hari@hostname') child.logfile = sys.stdout child.expect('hari\'s Password: ') = getting error as follows: child.expect('hari\'s Password: ') TypeError: must be str, not bytes === Thanks... -- h

Re: Pexpect idea - but can I handle curses?

2015-03-15 Thread Thomas 'PointedEars' Lahn
Skip Montanaro wrote: >> That might have to do with >> , specifically >> . > > Thanks, but not really helpful. I'm well aware of Eric Raymond's > contributions to the open source world. I

Re: Pexpect idea - but can I handle curses?

2015-03-14 Thread Skip Montanaro
>> Will I be in over my head trying to tweak the output? Hmmm... maybe if I tell top TERM=dumb? > > You may need to tell it TERM=dumb, though it might also refuse to run. It does run w/ TERM=dumb, so hopefully I won't have to resort to defining my own terminal definition. (Now, *that* takes me bac

Re: Pexpect idea - but can I handle curses?

2015-03-14 Thread Skip Montanaro
> That might have to do with > , specifically > . Thanks, but not really helpful. I'm well aware of Eric Raymond's contributions to the open source world. I'm also aware aware that my ques

Re: Pexpect idea - but can I handle curses?

2015-03-14 Thread Cameron Simpson
On 13Mar2015 10:17, Skip Montanaro wrote: I have this tweak I'd like to make to the top command (Linux only is fine). [...] However... I have a feeling I might be fairly seriously challenged trying to work with top's raw output, as it probably does something more sophisticated than clear the scr

Re: Pexpect idea - but can I handle curses?

2015-03-14 Thread Thomas 'PointedEars' Lahn
Skip Montanaro wrote: > Let's just let this thread die, shall we? So far, nobody seems interested > in attempting to answer my original question. That might have to do with , specifically

Re: Pexpect idea - but can I handle curses?

2015-03-13 Thread Skip Montanaro
On Fri, Mar 13, 2015 at 5:47 PM, Christian Gollwitzer wrote: > Why? Do you not have a C compiler? Sure I do, and I'm not afraid to use it. I realize top is just one not-terribly-critical tool, but every divergence between my machines and the "standard" install just makes it that much more diffi

Re: Pexpect idea - but can I handle curses?

2015-03-13 Thread Christian Gollwitzer
Am 13.03.15 um 18:25 schrieb Skip Montanaro: > I understand that. Tell that to management though. They were working > on 13.1 for awhile, but seem to be focused on 13.2 now, though not all > our internal software works on that. > > I'll give up on hoping I get access to a more modern top anytime s

Re: Pexpect idea - but can I handle curses?

2015-03-13 Thread Skip Montanaro
that to management though. They were working on 13.1 for awhile, but seem to be focused on 13.2 now, though not all our internal software works on that. I'll give up on hoping I get access to a more modern top anytime soon. Can someone give me some feedback on my harebrained pexpect idea? S

Re: Pexpect idea - but can I handle curses?

2015-03-13 Thread Thomas 'PointedEars' Lahn
Skip Montanaro wrote: > Thomas 'PointedEars' Lahn […] wrote: >> Yes, it (top(1) from procps-ng 3.3.9) does. Either run >> >> top -u '!root' >> >> or type “o” (for case-insensitive filter), then e.g. “!USER=root” to show >> processes started by all users except “root”. RTFM. > > Neither works

Re: Pexpect idea - but can I handle curses?

2015-03-13 Thread Skip Montanaro
On Fri, Mar 13, 2015 at 10:54 AM, Thomas 'PointedEars' Lahn < pointede...@web.de> wrote: > Yes, it (top(1) from procps-ng 3.3.9) does. Either run > > top -u '!root' > > or type “o” (for case-insensitive filter), then e.g. “!USER=root” to show > processes started by all users except “root”. RTF

Re: Pexpect idea - but can I handle curses?

2015-03-13 Thread Thomas 'PointedEars' Lahn
Skip Montanaro wrote: > I have this tweak I'd like to make to the top command (Linux only is > fine). Most of the time I want to see just one user or all users. Every > now and again though, I'd like to see all users except another. Top > doesn't support this functionality, Yes, it (top(1) from

Pexpect idea - but can I handle curses?

2015-03-13 Thread Skip Montanaro
I have this tweak I'd like to make to the top command (Linux only is fine). Most of the time I want to see just one user or all users. Every now and again though, I'd like to see all users except another. Top doesn't support this functionality, but I thought something like "-u -root" would be a ha

Why captured match is displayed as part of pexpect ".after" ?

2014-09-13 Thread Viet Nguyen
Hi, If any is familiar with pexpect, please help to point out why my script seems to fail to capture the desired text. Here, I want to log into a server 172.27.161.19. Once I see "Username: ", I will type in my userid "admin". The problem here is I have a list of key

Re: Problem with pexpect when executing a command on a remote machine

2014-08-27 Thread Chris Angelico
On Thu, Aug 28, 2014 at 1:27 AM, Kiran kumar Venkumahanti wrote: > ''Error sending command: cluster config -r -a Timeout exceeded in > read_nonblocking().\n\nversion: 2.4 > ($Revision: 516 $)\ncommand: /usr/bin/ssh\nargs: [\'/usr/bin/ssh\', \'-o\', > \'ServerAliveInterval=60\', \'-o\', \'UserKnown

Problem with pexpect when executing a command on a remote machine

2014-08-27 Thread Kiran kumar Venkumahanti
Hi, I am trying to execute a command on a remote machine for which I am using Python pexpect module. Iam able to connect and copy files to the remote machine but getting the following error when trying to execute commands on the remote machine. Please find the below error. ''Err

Re: pexpect - logging input AND output

2014-08-20 Thread Akira Li
sj.constant...@gmail.com writes: > i have a script running a few commands on a network device. i can't > seem to figure out how to log both the input and output of what the > pexpect script initiates and responds to. > > child = pexpect.spawn ('tel

Re: pexpect - logging input AND output

2014-08-14 Thread Chris Angelico
On Thu, Aug 14, 2014 at 6:59 PM, wrote: > i have a script running a few commands on a network device. i can't seem to > figure out how to log both the input and output of what the pexpect script > initiates and responds to. > > child = pexpect.spawn ('telnet '+

pexpect - logging input AND output

2014-08-14 Thread sj . constantine
i have a script running a few commands on a network device. i can't seem to figure out how to log both the input and output of what the pexpect script initiates and responds to. child = pexpect.spawn ('telnet '+ ip) child.expect ('.*:*') child.sen

Re: pexpect, loading an entry field

2013-08-07 Thread Lakshmipathi.G
Hi - I'm using Python 2.7.3 (Fedora 17) . I tried a simple example with pexpect to copy a file to remote system. It works $ cat pex.py import pexpect s = pexpect.spawn ('scp pex.py root@10.30.77.244:/tmp') s.expect ('Password:') s.sendline ('a') s.expect(pex

Re: pexpect, loading an entry field

2013-08-06 Thread inq1ltd
> pexpect looks simple to use. Please check this example > http://www.pythonforbeginners.com/systems-programming/how-to-use-the- pexpect > -module-in-python/ > > python help; > > > > I am using pexpect to open my program. > > Can someone tell me how to get dat

Re: pexpect, loading an entry field

2013-08-06 Thread Lakshmipathi.G
pexpect looks simple to use. Please check this example http://www.pythonforbeginners.com/systems-programming/how-to-use-the-pexpect-module-in-python/ -- Cheers, Lakshmipathi.G FOSS Programmer. www.giis.co.in On Tue, Aug 6, 2013 at 8:35 PM, inq1ltd wrote: > python help; > > >

pexpect, loading an entry field

2013-08-06 Thread inq1ltd
python help; I am using pexpect to open my program. Can someone tell me how to get data to appear in an entry field. After pexpect opens the my program I have tried to use send, sendline, and write functions to try to put data into the program's entry field. However, the data is going t

Re: capture html screen with pexpect

2013-07-08 Thread Dave Angel
On 07/07/2013 01:06 PM, inq1ltd wrote: python help, I can log into a web site with pexpect but what I want to do is pipe the opening window to a file. Logging into the site opens the site window but I can't get the window to a file. I can't use screen capture I need to get pexpe

capture html screen with pexpect

2013-07-08 Thread inq1ltd
python help, I can log into a web site with pexpect but what I want to do is pipe the opening window to a file. Logging into the site opens the site window but I can't get the window to a file. I can't use screen capture I need to get pexpect to pipe it to a txt file. Any he

pexpect on windows - child process of another child process - quick question

2013-03-09 Thread Z W
--> kicks off --> ia_launcher --kicks off --> java.exe We like to use pexpect to interact with the ia_launcher process, which seems to control the stdin/stdout of its own shell window to allow user to enter responses. So far, our research shows most examples are related to use of direct

Why is pexpect acting funny with sendline() and expect()?

2012-12-26 Thread saqib . ali . 75
I am running Solaris 5-10, python 2.6.2 and pexpect 2.4 I have the very simple python script below which exercises the functionality of sending and receiving text from the shell. My understanding is that pexepect([pexpect.TIMEOUT, x,y,z], timeout=w) will return the index of the match that it

Re: Pexpect and buffering

2012-12-16 Thread jim . hefferon
Sorry to reply to my own post, but I believe I have my answer and I want to help anyone who might google their way here: I need to change PROMPT and PROMPT_CONTINUE to be regular expressions, for instance by escaping the periods. -- http://mail.python.org/mailman/listinfo/python-list

Re: Pexpect and buffering

2012-12-15 Thread Chris Rebert
On Dec 15, 2012 4:51 AM, wrote: > > Hello, > > I'm trying to use pexpect to grab interactions with Python's REPL. I am having trouble with tracebacks. Possibly it is related to buffering (hence the subject line) but I admit that's a guess. Why are you doing this in

Pexpect and buffering

2012-12-15 Thread jim . hefferon
Hello, I'm trying to use pexpect to grab interactions with Python's REPL. I am having trouble with tracebacks. Possibly it is related to buffering (hence the subject line) but I admit that's a guess. At the end of this message is a minimal example program. It feeds three

Re: How to check if Pexpect child already exist?

2012-12-05 Thread Dave Angel
done on child before it has been spawned. > > --- > import pexpect > > child=pexpect.spawn('ssh mysurface@192.168.1.105') > child.sendline('test') > --- > > All we have to do is guess what you really mean. Do you mean you want to know if there are an

How to check if Pexpect child already exist?

2012-12-04 Thread Thomas Elsgaard
Hi List I am wondering, how can i check if child already exist before i spawn ? child.isalive() cannot be done on child before it has been spawned. --- import pexpect child=pexpect.spawn('ssh mysurface@192.168.1.105') child.sendline('test') --- Thomas -- http://mai

Re: PExpect Cross-Platform Alternative

2012-09-08 Thread freebee007
e python scripts. Originally, I utilized paramiko but found that > > the module had issues working with cisco equipment. I switched to > > pexpect and things have worked wonderfully since (I've been running this > > scripts in a Linux environment). However, I was just tasked to

Pexpect support with Python3.2.3

2012-04-20 Thread Girish bist
Hi - I am using the pexpect version 2.4 with Python-3.2.3. I have written a small script to verify the pexpect support with Python 3.2.3. This script times out during the system call select execution. Can anyone please help us with the issue here. The same script is working fine with Python 2.7.3

Re: Problem while doing a cat on a tabbed file with pexpect

2012-01-15 Thread Michael Torrie
ly ssh to the remote system and cat the file (bypassing any shells) or use sftp to access it. Either way you don't need to use pexpect with it. -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem while doing a cat on a tabbed file with pexpect

2012-01-15 Thread Steven D'Aprano
On Sun, 15 Jan 2012 09:51:44 -0800, Saqib Ali wrote: > I am using Solaris 10, python 2.6.2, pexpect 2.4 Are you sure about that? As far as I can see, pexpect's current version is 2.3 not 2.4. > I create a file called me.txt which contains the letters "A", "B", &

Re: Problem while doing a cat on a tabbed file with pexpect

2012-01-15 Thread Cameron Simpson
ls -al me.txt | -rw-r--r-- 1 myUsermyGroup 6 Jan 15 12:42 me.txt Ok, your file does indeed contain TABs. Therefre something is turning the TABs into spaces. Pexpect should be opening a pty and reading from that, and I do not expect that to expand TABs. So: 1: Using subprocess.Popen, i

Re: Problem while doing a cat on a tabbed file with pexpect

2012-01-15 Thread Saqib Ali
n 15 12:42 me.txt On Jan 15, 6:40 pm, Cameron Simpson wrote: > On 15Jan2012 23:04, Steven D'Aprano > wrote: > | On Sun, 15 Jan 2012 09:51:44 -0800, Saqib Ali wrote: > | > I am using Solaris 10, python 2.6.2, pexpect 2.4 > | > > | > I create a file called me.txt w

Re: Problem while doing a cat on a tabbed file with pexpect

2012-01-15 Thread Saqib Ali
Very good question. Let me explain why I'm not opening me.txt directly in python with open. The example I have posted is simplified for illustrative purpose. In reality, I'm not doing pexpect.spawn("/bin/tcsh"). I'm doing pexpect.spawn("ssh myuser@ipaddress"). Since I'm operating on a remote syst

Re: Problem while doing a cat on a tabbed file with pexpect

2012-01-15 Thread Cameron Simpson
On 15Jan2012 23:04, Steven D'Aprano wrote: | On Sun, 15 Jan 2012 09:51:44 -0800, Saqib Ali wrote: | > I am using Solaris 10, python 2.6.2, pexpect 2.4 | > | > I create a file called me.txt which contains the letters "A", "B", "C" | > on the same l

Re: Problem while doing a cat on a tabbed file with pexpect

2012-01-15 Thread Steven D'Aprano
On Sun, 15 Jan 2012 09:51:44 -0800, Saqib Ali wrote: > I am using Solaris 10, python 2.6.2, pexpect 2.4 > > I create a file called me.txt which contains the letters "A", "B", "C" > on the same line separated by tabs. [...] > Now, clearly the file con

Problem while doing a cat on a tabbed file with pexpect

2012-01-15 Thread Saqib Ali
I am using Solaris 10, python 2.6.2, pexpect 2.4 I create a file called me.txt which contains the letters "A", "B", "C" on the same line separated by tabs. My shell prompt is "% " I then do the following in the python shell: >>>

Re: Changing the system clock with pexpect confuses pexpect!

2011-12-26 Thread Roy Smith
In article <1f342621-0c96-447c-ad5d-f8c9dc777...@i6g2000vbe.googlegroups.com>, Saqib Ali wrote: > I believe what is going on is that internally pexpect uses the system > clock to keep track of when it receives data from spawned processes. > When I mess with the clock, tha

Changing the system clock with pexpect confuses pexpect!

2011-12-26 Thread Saqib Ali
See my code below. I'm controlling a shell logged in as root with pexpect. The class below has a method (startProc) which spawns a shell and keeps it alive until told to destroy it (stopProc). The other 2 methods in this class allow me to change the system clock and to get the IP Addre

Can I get use pexpect to control this process?

2011-12-21 Thread Saqib Ali
dless of the actual content. I want one file to contain the output from seconds 0-5, another file should contain 6-10, etc. etc. Can I do this with pexpect? I'm not sure I can because the "before" argument gives me EVERYTHING upto the most recent match. What I really need is somethi

Re: Need help with really elementary pexpect fragment

2011-12-20 Thread Saqib Ali
Oops! Good call. Thank you. You pointed out my mistake. - Saqib On Tue, Dec 20, 2011 at 12:31 AM, Nick Dokos wrote: > Saqib Ali wrote: > > > > > I want to write a pexpect script that simply cd's into a directory ("~/ > > install") and then runs a c

Re: Need help with really elementary pexpect fragment

2011-12-19 Thread Nick Dokos
Saqib Ali wrote: > > I want to write a pexpect script that simply cd's into a directory ("~/ > install") and then runs a command from there. It should be so easy. > But even my cd command is failing. Can't figure out what the problem > is. The command li

Need help with really elementary pexpect fragment

2011-12-19 Thread Saqib Ali
I want to write a pexpect script that simply cd's into a directory ("~/ install") and then runs a command from there. It should be so easy. But even my cd command is failing. Can't figure out what the problem is. The command line prompt is "[my machine name here] % &qu

Re: issue with pexpect

2011-10-05 Thread Daniel
, > > For about week i am experiencing a problem with pexpect that's why i > > hope you can help me :). > > Following is my code which tries to remove some files from the root dir > > and the code works on linux debian and freebsd but with no success on > > linux

Re: issue with pexpect

2011-10-05 Thread Daniel
there is no such implementation in fedora you can su as a root .. i can su from regular user to root with no problems the problem come when i use the pexpect module On Wed, 2011-10-05 at 14:47 +0200, Nizamov Shawkat wrote: > 2011/10/5 Daniel <5960...@gmail.com>: > > Hello, >

issue with pexpect

2011-10-05 Thread Daniel
Hello, For about week i am experiencing a problem with pexpect that's why i hope you can help me :). Following is my code which tries to remove some files from the root dir and the code works on linux debian and freebsd but with no success on linux fedora .. any idea why this happen only in f

issue with pexpect

2011-10-05 Thread Daniel
Hello, For about week i am experiencing a problem with pexpect that's why i hope you can help me :). Following is my code which tries to remove some files from the root dir and the code works on linux debian and freebsd but with no success on linux fedora .. any idea why this happen only in f

Re: pexpect and OpenVMS

2011-06-09 Thread Mark Franklin
I ran into a similar problem. I found throttling self.sh.delaybeforesend works for me. I'm on ubuntu. -- http://mail.python.org/mailman/listinfo/python-list

Re: pexpect: TIMEOUT no longer clears child.before

2011-05-25 Thread Gabriel Genellina
En Thu, 19 May 2011 08:29:21 -0300, Adrian Casey escribió: The behaviour of pexpect has changed between version 2.1 and 2.3. In version 2.1, the following code would result in child.before being cleared -: >>>child.expect(pexpect.TIMEOUT,1) In version 2.3, this is no longer

pexpect: TIMEOUT no longer clears child.before

2011-05-19 Thread Adrian Casey
The behaviour of pexpect has changed between version 2.1 and 2.3. In version 2.1, the following code would result in child.before being cleared -: >>>child.expect(pexpect.TIMEOUT,1) In version 2.3, this is no longer the case. No matter how many times the above code is run, chi

Re: stuck with Pexpect script need help!!

2010-12-12 Thread Alexander Kapps
On 12.12.2010 17:06, Emile van Sebille wrote: On 12/10/2010 10:02 PM Darshak Bavishi said... Pexpect is intended for UNIX-like operating systems.""") Can we use pexpect from windows host machine ?! I expect not... Emile According to [1] you might get it working with

Re: stuck with Pexpect script need help!!

2010-12-12 Thread Emile van Sebille
On 12/10/2010 10:02 PM Darshak Bavishi said... Pexpect is intended for UNIX-like operating systems.""") Can we use pexpect from windows host machine ?! I expect not... Emile -- http://mail.python.org/mailman/listinfo/python-list

stuck with Pexpect script need help!!

2010-12-10 Thread Darshak Bavishi
Hi Experts, got ready made code for ssh to unix using python host machine is windows now when i run this its gives following error : * Traceback (most recent call last): File "C:\Python26\pexpect-2.1\pexpect-2.1\pxssh.py", line 1, in from pexpect import * File "C:\Python26\pexp

I can't seem to change the timeout value on pexpect

2010-12-01 Thread chad
I tried to change the timeout value from 30 to 90 for pexpect in the following script... #!/usr/bin/python import telnetlib import time import pexpect def get_name(): user = raw_input("\nUsername: ") password = raw_input("Password: ") idle(user, password) def

Re: Hello, Everyone. I have a problem when using Pexpect module.

2010-11-05 Thread dachuan
maybe i found why pexpect doesn't work in my environment. (but still, i don't know how solve it) my machine is actually a xen domain U, whose kernel is host's kernel. when I test pexpect module directly on host machine, it works pretty fine. and that's all I can do about i

Hello, Everyone. I have a problem when using Pexpect module.

2010-11-04 Thread dachuan
hi, everyone. When I use Pexpect Module, I met the following problem and don't know how to handle it. Any advice is appreciated ! My environment: Linux node08_xen3.4.3_rhel5_1 2.6.18.8-xen #1 SMP Wed Jul 14 17:20:01 CST 2010 i686 i686 i386 GNU/Linux (FYI: this is a virtual machine.) Python

Re: pexpect and logging integration

2010-03-11 Thread Lars Stavholm
It works like a charm, thank you! /Lars Jean-Michel Pichavant wrote: > Lars Stavholm wrote: >> Hi all, >> >> has anyone managed to integrate pexpect and logging? >> >> I.e., I'd like to be able to pick up the dialog, >> commands sent and responses

Re: pexpect and logging integration

2010-03-10 Thread Jean-Michel Pichavant
Lars Stavholm wrote: Hi all, has anyone managed to integrate pexpect and logging? I.e., I'd like to be able to pick up the dialog, commands sent and responses received, in my logging. I know about the pexpect logfile, and I can log things to stdout or stderr, but I really need to log usin

pexpect and logging integration

2010-03-09 Thread Lars Stavholm
Hi all, has anyone managed to integrate pexpect and logging? I.e., I'd like to be able to pick up the dialog, commands sent and responses received, in my logging. I know about the pexpect logfile, and I can log things to stdout or stderr, but I really need to log using the python logging li

exp_internal in pexpect

2010-03-03 Thread Pankaj
how to enable expect log in pexpect ? (similar as exp_internal in expect) -- http://mail.python.org/mailman/listinfo/python-list

timeout restart in pexpect

2010-03-02 Thread Pankaj
I am using pexpect to automate some procedures. My procedures are time cosuming, some messages coming out from that, in failure cases it will not output anything. So I would like to give small timeout value but when some message is received, it should restart the timeout, similar like

Re: PExpect Cross-Platform Alternative

2010-02-12 Thread corey goldberg
> > I was just tasked to get > > these scripts running in a windows environment and to my dismay very > > quickly realized that pexpect is not cross platform compatible. > > Am I stuck, or are there solutions out there? I haven't tried it, but here is another Python

Re: PExpect Cross-Platform Alternative

2010-02-11 Thread Steve Holden
Nathan Farrar wrote: > Hello Community, > > Recently I've been automating lots of network operations tasks via > simple python scripts. Originally, I utilized paramiko but found that > the module had issues working with cisco equipment. I switched to > pexpect and things

PExpect Cross-Platform Alternative

2010-02-11 Thread Nathan Farrar
Hello Community, Recently I've been automating lots of network operations tasks via simple python scripts. Originally, I utilized paramiko but found that the module had issues working with cisco equipment. I switched to pexpect and things have worked wonderfully since (I've been ru

Re: Is pexpect unmaintained now?

2009-11-20 Thread yuzhichang
On 11月17日, 上午11时40分, yuzhichang wrote: > Pexpect2.4 is only available at Pypi. Both the homepage > ofpexpect(http://www.noah.org/wiki/Pexpect) and download page > (http://sourceforge.net/projects/pexpect/files/) are outdated. The > repository on Github (http://github.com/noahspur

Re: Where to find pexpect

2009-11-20 Thread yuzhichang
; > Does someone know the current location? > > maybe they removed the distribution so you may use "subprocess" :o) > > JM http://pexpect.sourceforge.net seems outdated. I've forked, ported to Python 3.1, and added more features to pexpect. See http://github.com/yuzhich

Is pexpect unmaintained now?

2009-11-16 Thread yuzhichang
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

pexpect maxread problem

2009-10-22 Thread Bojan Sukalo
I want to collect the the information from cisco devices through ssh. Using pexpect logout method seems good but maxread attribute is limited to 1168 characters. Allthough I set it to 2000, when I do show running-config on cisco router output comes to the logfile until the 1168 character is

Re: Where to find pexpect

2009-10-13 Thread Jean-Michel Pichavant
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

  1   2   3   >