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 logs to at least appear

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: Curtains for Windows. -- https://mail.python.

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" pattern. Generally overus

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") child.expect(".*assword:")

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
On Fri, Mar 13, 2015 at 12:03 PM, Thomas 'PointedEars' Lahn wrote: > “o” is not an option, it is an interaktive keystroke command in (my) top(1). "o" is also an unrecognized keystroke. > OpenSUSE 12.2 has reached its end-of-life on 2014-01-27. I understand that. Tell that to management though.

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

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 ('telnet '+ ip) > child.expect ('.*:*') > child.sendlin

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 '+ ip) If that's not working for yo

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(pexpect.EOF,timeout=20) Execute above prog

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 data to appear in > > an entry field. >

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; > > > > I am using p

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 the first place? Why invoke a

Re: PExpect Cross-Platform Alternative

2012-09-08 Thread freebee007
Hello Steve, I was wondering if you had working examples of your automated tasks in python ... I am asking because I am starting out in Python, and I believe I can save my company time and headaches by automating a lot of the tasks we have. I would like to study your code and see if I can use it

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 the case.

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 received, in my logging. >> I know about the pexpe

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 using the

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 implementation of Expect that

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 have worked wonderfully

Re: PExpect on Windows System Using Cygwin

2009-09-25 Thread Kevin Holleran
On Fri, Sep 25, 2009 at 6:09 AM, Dave Angel wrote: > Sean DiZazzo wrote: > >> On Sep 24, 4:37 pm, Dave Angel wrote: >> >> >>> >>> Why not just use the subprocess module? It's built into the Windows >>> distribution, and doesn't need cygwin. >>> >>> DaveA >>> >>> >> >> Can subprocess

Re: PExpect on Windows System Using Cygwin

2009-09-25 Thread Dave Angel
Sean DiZazzo wrote: On Sep 24, 4:37 pm, Dave Angel wrote: 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? ~Sean I don't kn

Re: PExpect on Windows System Using Cygwin

2009-09-24 Thread Sean DiZazzo
On Sep 24, 4:37 pm, Dave Angel 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 periodic

Re: PExpect on Windows System Using Cygwin

2009-09-24 Thread Dave Angel
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 with Py

Re: pexpect and unicode strings

2009-09-04 Thread Sean DiZazzo
On Sep 4, 7:11 pm, Mathew Oakes 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 = u'Nation . Search the FO

Re: pexpect on solaris 10

2009-03-04 Thread Jorgen Grahn
On Tue, 3 Mar 2009 14:37:20 -0800 (PST), Chris Pella 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 to control a message com

Re: Pexpect and telnet not communicating properly

2009-01-27 Thread Mark Wooding
David Anderson writes: > I am trying to automate the following session - to talk to my router: > > telnet speedtouch [...] > I am using the following code: [...] > child.expect('sername : ') > child.sendline('Administrator') I've scripted communications with my Speedtouch 510 using pexpect: I us

Re: Pexpect and telnet not communicating properly

2009-01-27 Thread George Trojan
David Anderson wrote: I am trying to automate the following session - to talk to my router: === telnet speedtouch Trying 192.168.1.254... Connected to speedtouch. Escape character is '^]'. Username : Administrator Password : ---

Re: Pexpect echoes twice for each read

2008-09-19 Thread RDarrelBonner
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 > # Inp

Re: Pexpect question.

2008-04-03 Thread Jorgen Grahn
On Wed, 02 Apr 2008 19:57:31 -0600, Paul Lemelle <[EMAIL PROTECTED]> wrote: > 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 sshc

Re: Pexpect question.

2008-04-02 Thread Paul Lemelle
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, but th

Re: Pexpect question.

2008-03-30 Thread Jorgen Grahn
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 sent

Re: pexpect ssh login and ls | grep

2008-01-01 Thread crybaby
I did try to excute the ssh and shell ls grep command in all in one like so: ssh [EMAIL PROTECTED] "ls mytest.log > /dev/null 2>&1; echo $?" This seem to work, but also throwing exceptions. Also, including ssh and shell command together would be a problem when I later add a pass phrase to ssh k

Re: pexpect ssh login and ls | grep

2008-01-01 Thread crybaby
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: >>> i

Re: pexpect ssh login and ls | grep

2008-01-01 Thread Dikkie Dik
> 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

Re: pexpect ssh login and ls | grep

2008-01-01 Thread Karthik Gurusamy
On Dec 31 2007, 6:46 pm, crybaby <[EMAIL PROTECTED]> wrote: > 1) what are these characters: > \x1b]0; > ~\x07\x1b[?1034h > > in line '\x1b]0;[EMAIL PROTECTED]:[EMAIL PROTECTED] ~]'? These are probably escape sequences in your shell prompt string. Typically they are interpreted by the terminal, lik

Re: pexpect ssh login and ls | grep

2007-12-31 Thread crybaby
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.s

Re: pexpect ssh login and ls | grep

2007-12-31 Thread Cameron Laird
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

Re: Pexpect and a Linux Terminal

2007-12-26 Thread [EMAIL PROTECTED]
On 25 déc, 15:49, [EMAIL PROTECTED] wrote: > On Dec 25, 8:42 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > > > On 25 déc, 10:14, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > > On 25 déc, 09:41, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > > > Yes it's work ! :-D > > > > >

Re: Pexpect and a Linux Terminal

2007-12-25 Thread prikar20
On Dec 25, 8:42 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On 25 déc, 10:14, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > > > On 25 déc, 09:41, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > > Yes it's work ! :-D > > > > I use prompt = '.*#' to detect the prompt expect. Tha

Re: Pexpect and a Linux Terminal

2007-12-25 Thread [EMAIL PROTECTED]
On 25 déc, 10:14, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > 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 proble

Re: Pexpect and a Linux Terminal

2007-12-25 Thread [EMAIL PROTECTED]
On 25 déc, 10:14, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > 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 proble

Re: Pexpect and a Linux Terminal

2007-12-25 Thread [EMAIL PROTECTED]
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 impor

Re: Pexpect and a Linux Terminal

2007-12-25 Thread [EMAIL PROTECTED]
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

Re: Pexpect and a Linux Terminal

2007-12-24 Thread Michael Bentley
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 -" >

Re: Pexpect and a Linux Terminal

2007-12-24 Thread Karthik Gurusamy
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 > cm

Re: Pexpect: SSH, Command and Password

2007-04-04 Thread Gil_H
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

Re: Pexpect: SSH, Command and Password

2007-04-04 Thread Ganesan Rajagopal
> "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 som

Re: pexpect regex help

2007-02-23 Thread amadain
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 an

Re: pexpect regex help

2007-02-23 Thread amadain
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 rea

Re: pexpect regex help

2007-02-23 Thread amadain
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 = s

Re: pexpect regex help

2007-02-21 Thread jonathan . sabo
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]) > i

Re: pexpect with apache

2006-10-19 Thread [EMAIL PROTECTED]
Thank you both for your help. I don't know why I didn't think of that before. I had the expect mindset, and was determined to get it working that way. I added an entry for sudo for the script and it works without a hitch. I'm still curious to know what was going on to disallow the authentication

Re: pexpect with apache

2006-10-18 Thread martdi
Since it wont require pyexpect, and based on the operations you accomplish with your python script, maybe that a bash script instead of a python one might be the best tool for the job you're trying to accomplish. martdi wrote: > Sudo is probably the best solution here, since in the file sudo.conf

Re: pexpect with apache

2006-10-18 Thread martdi
Sudo is probably the best solution here, since in the file sudo.conf you could restrict the www user only to the python script that requires it. Also, using either sudo or the setuid flag would remove the need of pexpect since all the commands will be run as the designated user. for setuid flag:

Re: pexpect with apache

2006-10-18 Thread Lee Harr
> 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

Re: pexpect with apache

2006-10-18 Thread martdi
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. An other way to make your script run as root is to set the setuid bit on your python script to make it run as

Re: pexpect baudrate and mode settings

2006-09-21 Thread Ganesan Rajagopal
> Bryce Bolton <[EMAIL PROTECTED]> writes: > In short, setting of critical parameters is unclear under pexpect's > documentation, but may be obvious to those more familiar with os.open or > other filesystem internals. Try using "stty" program on Linux to set these parameters before you use pe

Re: pexpect baudrate and mode settings

2006-09-20 Thread Bryce Bolton
Hi, I've written a short script in pexpect to open the serial port and get 100 bytes.  The script does receive a string of garbage, but not the good text seen when I open a minicom terminal and look at ttyS0.  I know that the baud rate is wrong, and the other settings (such as 8N1) are unknown t

Re: pexpect question....

2005-07-05 Thread [EMAIL PROTECTED]
Hi, While I continue to look at the problem, I thought I would post more details. In a sense, this is more of a UNIX issue. I have a python script that uses pexpect to spawn a child process (p1). The python script then goes ahead and does a "tail --pid=p1". Assuming that I do close(wait=0), P1 c

Re: pexpect question....

2005-07-04 Thread Jonathan Ellis
[EMAIL PROTECTED] wrote: > Currently, I am spawning a new thread > that just does pexpect_spawned_child.close(wait=1). It seems to work in > some cases but the child process is occassionally getting deadlocked. I think your only cross-platform option will be to fix the child process to die nicely

Re: pexpect question....

2005-07-04 Thread [EMAIL PROTECTED]
Hi, I actually replied saying that the process dies when close(wait=0) is done (the reply doesn't show up yet). It is not correct. The process actually runs but ends up in zombie status (defunct). Raghu. -- http://mail.python.org/mailman/listinfo/python-list

Re: pexpect question....

2005-07-02 Thread Ganesan Rajagopal
> "[EMAIL PROTECTED]" == [EMAIL PROTECTED] com <[EMAIL PROTECTED]> writes: > Hi, > I am using pexpect to spawn an interactive program and wait for > particular string in its output. It works fine but once I get this > required information, I really don't care about the child process > anymore.

RE: Pexpect getting a defuct process

2005-01-04 Thread Jorge Luiz Godoy Filho
Baillargeon, Sonny, TerÃa 04 Janeiro 2005 16:16, wrote: > Nothing...I know that's the default answer but considering I control the > environment, I can assure you that nothing changed. I have no reason to doubt you. :-) Checking pexpect's documentation, and re-reading your code I see that you h

RE: Pexpect getting a defuct process

2005-01-04 Thread Baillargeon, Sonny
Nothing...I know that's the default answer but considering I control the environment, I can assure you that nothing changed. -Original Message- From: Jorge Luiz Godoy Filho [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 04, 2005 12:06 PM To: python-list@python.org Subjec

Re: Pexpect getting a defuct process

2005-01-04 Thread Jorge Luiz Godoy Filho
Baillargeon, Sonny, TerÃa 04 Janeiro 2005 14:42, wrote: > This used to work before but now I get a defunct process after it runs. > Any ideas? "before" what? What has changed in your environment to make it stop working? -- Godoy. <[EMAIL PROTECTED]> -- http://mail.python.org/mailman/lis