pip3 install pipenv
pipenv shell
from subprocess import Popen, PIPE | |
def shell_out(command): | |
return Popen(command.split(' '), stdout=PIPE,stderr=PIPE).communicate()[0].strip('\n').split('\n') | |
def main(): | |
return shell_out('echo one\ntwo\nthree\n') |