Created
June 3, 2021 21:33
-
-
Save belonesox/eb61ab3b31a0a5904f6ed7fa2840fb34 to your computer and use it in GitHub Desktop.
debugging problem vscode wtf-future.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
popenargs = ([ | |
'python', | |
'-c', | |
''' | |
from __future__ import print_function; | |
print(2222) | |
print(111) | |
''' | |
],) | |
kwargs = {'stderr': -1} | |
process = subprocess.Popen(stdout=subprocess.PIPE, *popenargs, **kwargs) | |
output, stderr = process.communicate() | |
retcode = process.poll() | |
print(output) | |
print(stderr) | |
print(retcode) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment