Message11822

Author jeff.allen
Recipients fwierzbicki, jeff.allen, ssteiner, zyasoft
Date 2018-03-17.13:26:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1521293163.38.0.467229070634.issue1748@psf.upfronthosting.co.za>
In-reply-to
Content
There have been numerous fixes in subprocess since this issue. This works for me in Jython 2.7.2a1:

C:\Users\Jeff\Documents\Jython\bugs>jython
Jython 2.7.2a1+ (default:d74f8c2cd56f, Feb 24 2018, 17:18:53)
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.8.0_151
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.system("subst a: .")
Drive already SUBSTed
1
>>> import subprocess
>>> p_subst = subprocess.Popen('subst z: "c:\\"',  shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
>>> p_subst = subprocess.Popen('subst a: "."',  shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
>>> errmsg = p_subst.communicate()[0]
>>> errmsg
'Drive already SUBSTed\r\n'

Propose to close.
History
Date User Action Args
2018-03-17 13:26:03jeff.allensetmessageid: <1521293163.38.0.467229070634.issue1748@psf.upfronthosting.co.za>
2018-03-17 13:26:03jeff.allensetrecipients: + jeff.allen, fwierzbicki, zyasoft, ssteiner
2018-03-17 13:26:03jeff.allenlinkissue1748 messages
2018-03-17 13:26:02jeff.allencreate