Created
December 1, 2020 23:20
-
-
Save echiesse/8042dcd8c220b9d06f488f2450b1d8fd to your computer and use it in GitHub Desktop.
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 | |
if __name__ == '__main__': | |
commands = b''' | |
a=5 | |
b=7 | |
c=a+b | |
print(c) | |
print("abacate") | |
''' | |
p = subprocess.run('python', input=commands, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) | |
print(p.stdout.decode('utf-8')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment