Skip to content

Instantly share code, notes, and snippets.

@jamesperes-zz
Last active April 24, 2019 01:10
Show Gist options
  • Save jamesperes-zz/5ee9a51d91bd6304038b379796450616 to your computer and use it in GitHub Desktop.
Save jamesperes-zz/5ee9a51d91bd6304038b379796450616 to your computer and use it in GitHub Desktop.
◀◀ buffers
import sys, io
try:
from pip import main as pipmain
except:
from pip._internal import main as pipmain
stdout = sys.stdout
sys.stdout = io.StringIO()
bb = pipmain(['show', "create-aio-app"])
output = sys.stdout.getvalue()
sys.stdout = stdout
print(type(output))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment