Message11822
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. |
|
Date |
User |
Action |
Args |
2018-03-17 13:26:03 | jeff.allen | set | messageid: <1521293163.38.0.467229070634.issue1748@psf.upfronthosting.co.za> |
2018-03-17 13:26:03 | jeff.allen | set | recipients:
+ jeff.allen, fwierzbicki, zyasoft, ssteiner |
2018-03-17 13:26:03 | jeff.allen | link | issue1748 messages |
2018-03-17 13:26:02 | jeff.allen | create | |
|