This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author JatinGoel
Recipients JatinGoel, paul.moore, steve.dower, tim.golden, zach.ware
Date 2018-04-15.11:25:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1523791534.02.0.682650639539.issue33282@psf.upfronthosting.co.za>
In-reply-to
Content
Hi
needed a small help related to the subprocess module
I'm executing a powershell process using the subprocess module

process = subprocess.Popen(
    [
        'powershell.exe',
        script
    ],
    stdout=subprocess.PIPE,
    stderr=subprocess.PIPE,
    shell=True
)

output, error = process.communicate()

but the call to the communicate method is getting hung on some machines, and not all

i tried to debug the subprocess module but couldn't find anything helpful

the script is not expecting any input from the user

on the machines where it failed, if I just add stdin=subprocess.PIPE argument, it works

process = subprocess.Popen(
    [
        'powershell.exe',
        script
    ],
    stdin=subprocess.PIPE,
    stdout=subprocess.PIPE,
    stderr=subprocess.PIPE,
    shell=True
)

above works
History
Date User Action Args
2018-04-15 11:25:34JatinGoelsetrecipients: + JatinGoel, paul.moore, tim.golden, zach.ware, steve.dower
2018-04-15 11:25:34JatinGoelsetmessageid: <1523791534.02.0.682650639539.issue33282@psf.upfronthosting.co.za>
2018-04-15 11:25:33JatinGoellinkissue33282 messages
2018-04-15 11:25:33JatinGoelcreate