[issue1124861] subprocess fails on GetStdHandle in interactive GUI

2010-03-21 Thread bairam

bairam  added the comment:

I have tested this form in Python26 ,It works
>>> import subprocess
>>> p = subprocess.Popen("cmd.exe dir", stdout=subprocess.PIPE)
>>> p.communicate()
('Microsoft Windows XP [Version 5.1.2600]\r\n(C) Copyright 1985-2001 Microsoft 
Corp.\r\n\r\nC:\\Python26>', None)

--
nosy: +bairam

___
Python tracker 
<http://bugs.python.org/issue1124861>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1124861] subprocess fails on GetStdHandle in interactive GUI

2010-03-21 Thread bairam

bairam  added the comment:

shell vs subprocess
The problem is the default option "Shell" is "False" , you you write commands 
you should turn on the shell.
for example try this to show the content of directory " C:\Python26
":
>>>import subprocess
>>> p = subprocess.Popen("dir", shell=True,stdout=subprocess.PIPE, 
>>> stderr=subprocess.PIPE)
>>> stdout,stderr=p.communicate()
>>> print stderr # if errors doe not occur ,it is empty!

>>> print stdout

--
versions: +Python 2.6 -Python 2.5

___
Python tracker 
<http://bugs.python.org/issue1124861>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com