Re: [Tutor] REG : Pexpect timeout issue

2018-09-01 Thread Cameron Simpson
On 02Sep2018 14:29, Steven D'Aprano wrote: On Sun, Sep 02, 2018 at 10:01:02AM +1000, Cameron Simpson wrote: On 02Sep2018 00:31, Steven D'Aprano wrote: >On Sat, Sep 01, 2018 at 11:41:42AM +, krishna chaitanya via Tutor >wrote: >>Below is my code, i am frequently hitting timeout issue to log

Re: [Tutor] REG : Pexpect timeout issue

2018-09-01 Thread Steven D'Aprano
On Sun, Sep 02, 2018 at 10:01:02AM +1000, Cameron Simpson wrote: > On 02Sep2018 00:31, Steven D'Aprano wrote: > >On Sat, Sep 01, 2018 at 11:41:42AM +, krishna chaitanya via Tutor > >wrote: > >>Below is my code, i am frequently hitting timeout issue to login to linux > >>or router. > > > >Tim

Re: [Tutor] "Python not recognized as a command"

2018-09-01 Thread Mats Wichmann
On 09/01/2018 04:24 PM, Marc Tompkins wrote: > On Sat, Sep 1, 2018 at 10:40 AM, Dana O'Connor > wrote: > >> Hi, >> I've been trying to download and use Python 3.7 for the past few days and >> every time I try to open it it tells me I don't have "pip" which should be >> impossible because this ver

Re: [Tutor] REG : Pexpect timeout issue

2018-09-01 Thread Cameron Simpson
On 02Sep2018 00:31, Steven D'Aprano wrote: On Sat, Sep 01, 2018 at 11:41:42AM +, krishna chaitanya via Tutor wrote: Below is my code, i am frequently hitting timeout issue to login to linux or router. Timeout issues are a network problem. Perhaps your network is too busy, or the cable is

Re: [Tutor] REG : Pexpect timeout issue

2018-09-01 Thread Cameron Simpson
On 01Sep2018 20:33, Alan Gauld wrote: On 01/09/18 12:41, krishna chaitanya via Tutor wrote: child = spawn('su x',timeout = 50) What is the timeout interval? If its in milliseconds then 50 is much too short, try 5000. If its in seconds then you have a problem... How long does it take to c

Re: [Tutor] "Python not recognized as a command"

2018-09-01 Thread Marc Tompkins
On Sat, Sep 1, 2018 at 10:40 AM, Dana O'Connor wrote: > Hi, > I've been trying to download and use Python 3.7 for the past few days and > every time I try to open it it tells me I don't have "pip" which should be > impossible because this version of Python is supposed to automatically come > with

Re: [Tutor] "Python not recognized as a command"

2018-09-01 Thread Alan Gauld via Tutor
On 01/09/18 18:40, Dana O'Connor wrote: > I've been trying to download and use Python 3.7 for the past few days How exactly did you download it (from which site and in which format?) And how did you then install it? > every time I try to open it it tells me I don't have "pip" That seems unlik

Re: [Tutor] REG : Pexpect timeout issue

2018-09-01 Thread Alan Gauld via Tutor
On 01/09/18 12:41, krishna chaitanya via Tutor wrote: > Below is my code, i am frequently hitting timeout issue to login to linux or > router. Have you tried extending the timeout? > child = spawn('su x',timeout = 50) What is the timeout interval? If its in milliseconds then 50 is much to

[Tutor] "Python not recognized as a command"

2018-09-01 Thread Dana O'Connor
Hi, I've been trying to download and use Python 3.7 for the past few days and every time I try to open it it tells me I don't have "pip" which should be impossible because this version of Python is supposed to automatically come with pip (?). Additionally, whenever I open the command prompt on my

Re: [Tutor] REG : Pexpect timeout issue

2018-09-01 Thread Steven D'Aprano
On Sat, Sep 01, 2018 at 11:41:42AM +, krishna chaitanya via Tutor wrote: > Hi Team, > Below is my code, i am frequently hitting timeout issue to login to linux or > router. Timeout issues are a network problem. Perhaps your network is too busy, or the cable is faulty, or your router is being

[Tutor] REG : Pexpect timeout issue

2018-09-01 Thread krishna chaitanya via Tutor
Hi Team, Below is my code, i am frequently hitting timeout issue to login to linux or router. import pexpectfrom pexpect import *child = spawn('su x',timeout = 50)child.expect('Password:',timeout = 50)child.sendline('XXX')#child.sendline('ls -l')#chasis = child.before.decode('utf-8')chi