Skip to content

Instantly share code, notes, and snippets.

@belonesox
Created June 3, 2021 21:33
Show Gist options
  • Save belonesox/eb61ab3b31a0a5904f6ed7fa2840fb34 to your computer and use it in GitHub Desktop.
Save belonesox/eb61ab3b31a0a5904f6ed7fa2840fb34 to your computer and use it in GitHub Desktop.
debugging problem vscode wtf-future.py
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