Re: subprocess escaping POpen?!

2010-08-06 Thread Lawrence D'Oliveiro
In message mailman.1621.1281012420.1673.python-l...@python.org, Chris Withers wrote: Wolfgang Rohdewald wrote: On Donnerstag 05 August 2010, Chris Withers wrote: But why only the request for auth credentials? for security reasons I suppose - make sure a human enters the password Well

subprocess escaping POpen?!

2010-08-05 Thread Chris Withers
Hi All, I have a script that does the following: from subprocess import Popen,PIPE,STDOUT def execute(command,cwd): return Popen( command, stderr=STDOUT, stdout=PIPE, universal_newlines=True, cwd=cwd, shell=True, ).communicate()[0]

Re: subprocess escaping POpen?!

2010-08-05 Thread Chris Withers
Wolfgang Rohdewald wrote: On Donnerstag 05 August 2010, Chris Withers wrote: ...then the output is indeed captured. So, what is svn doing differently? How is it escaping its jail? maybe it does not read from stdin but directly from /dev/tty But why only the request for auth credentials?

Re: subprocess escaping POpen?!

2010-08-05 Thread Wolfgang Rohdewald
On Donnerstag 05 August 2010, Chris Withers wrote: ...then the output is indeed captured. So, what is svn doing differently? How is it escaping its jail? maybe it does not read from stdin but directly from /dev/tty -- Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: subprocess escaping POpen?!

2010-08-05 Thread Jean-Michel Pichavant
Chris Withers wrote: Hi All, I have a script that does the following: from subprocess import Popen,PIPE,STDOUT def execute(command,cwd): return Popen( command, stderr=STDOUT, stdout=PIPE, universal_newlines=True, cwd=cwd, shell=True,

Re: subprocess escaping POpen?!

2010-08-05 Thread Chris Withers
Jean-Michel Pichavant wrote: You did not redirect stdin, so it is expected you can still read input from the console. Okay, so if I definitely wanted no input, what should I pass as the stdin parameter to the POpen constructor? And it looks like svn is writting the credentials prompt on

Re: subprocess escaping POpen?!

2010-08-05 Thread Ryan Kelly
On Thu, 2010-08-05 at 12:58 +0100, Chris Withers wrote: Jean-Michel Pichavant wrote: You did not redirect stdin, so it is expected you can still read input from the console. Okay, so if I definitely wanted no input, what should I pass as the stdin parameter to the POpen constructor?

Re: subprocess escaping POpen?!

2010-08-05 Thread Wolfgang Rohdewald
On Donnerstag 05 August 2010, Chris Withers wrote: But why only the request for auth credentials? for security reasons I suppose - make sure a human enters the password -- Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: subprocess escaping POpen?!

2010-08-05 Thread Chris Withers
Wolfgang Rohdewald wrote: On Donnerstag 05 August 2010, Chris Withers wrote: But why only the request for auth credentials? for security reasons I suppose - make sure a human enters the password Well yes, but what if you actually want to script it? Chris -- Simplistix - Content

Re: subprocess escaping POpen?!

2010-08-05 Thread Grant Edwards
On 2010-08-05, Chris Withers ch...@simplistix.co.uk wrote: Wolfgang Rohdewald wrote: On Donnerstag 05 August 2010, Chris Withers wrote: But why only the request for auth credentials? for security reasons I suppose - make sure a human enters the password Well yes, but what if you actually

Re: subprocess escaping POpen?!

2010-08-05 Thread Jean-Michel Pichavant
Chris Withers wrote: Jean-Michel Pichavant wrote: You did not redirect stdin, so it is expected you can still read input from the console. Okay, so if I definitely wanted no input, what should I pass as the stdin parameter to the POpen constructor? You do want an input don't you ? 'cause

Re: subprocess escaping POpen?!

2010-08-05 Thread Kushal Kumaran
- Original message - Wolfgang Rohdewald wrote: On Donnerstag 05 August 2010, Chris Withers wrote: But why only the request for auth credentials? for security reasons I suppose - make sure a human enters the password Well yes, but what if you actually want to script it?

Re: subprocess escaping POpen?!

2010-08-05 Thread Chris Withers
Kushal Kumaran wrote: - Original message - Wolfgang Rohdewald wrote: On Donnerstag 05 August 2010, Chris Withers wrote: But why only the request for auth credentials? for security reasons I suppose - make sure a human enters the password Well yes, but what if you

Re: subprocess escaping POpen?!

2010-08-05 Thread Tim Golden
On 05/08/2010 15:38, Chris Withers wrote: Kushal Kumaran wrote: - Original message - Wolfgang Rohdewald wrote: On Donnerstag 05 August 2010, Chris Withers wrote: But why only the request for auth credentials? for security reasons I suppose - make sure a human enters the

Re: subprocess escaping POpen?!

2010-08-05 Thread Chris Withers
Tim Golden wrote: See http://pexpect.sf.net for a python version. ...which doesn't work on Windows. There is a winpexpect: http://pypi.python.org/pypi/winpexpect/1.3 Are the two api-identical? Chris -- Simplistix - Content Management, Batch Processing Python Consulting -

Re: subprocess escaping POpen?!

2010-08-05 Thread Tim Golden
On 05/08/2010 15:49, Chris Withers wrote: Tim Golden wrote: See http://pexpect.sf.net for a python version. ...which doesn't work on Windows. There is a winpexpect: http://pypi.python.org/pypi/winpexpect/1.3 Are the two api-identical? From the bitbucket page:

Re: subprocess escaping POpen?!

2010-08-05 Thread Chris Withers
Tim Golden wrote: On 05/08/2010 15:49, Chris Withers wrote: Tim Golden wrote: See http://pexpect.sf.net for a python version. ...which doesn't work on Windows. There is a winpexpect: http://pypi.python.org/pypi/winpexpect/1.3 Are the two api-identical? From the bitbucket page:

Re: subprocess escaping POpen?!

2010-08-05 Thread Tim Golden
On 05/08/2010 15:56, Chris Withers wrote: Tim Golden wrote: On 05/08/2010 15:49, Chris Withers wrote: Tim Golden wrote: See http://pexpect.sf.net for a python version. ...which doesn't work on Windows. There is a winpexpect: http://pypi.python.org/pypi/winpexpect/1.3 Are the two

Re: subprocess escaping POpen?!

2010-08-05 Thread Nobody
On Thu, 05 Aug 2010 12:23:35 +0100, Chris Withers wrote: ...then the output is indeed captured. So, what is svn doing differently? How is it escaping its jail? maybe it does not read from stdin but directly from /dev/tty But why only the request for auth credentials? So that you can do