Created
November 24, 2016 05:42
-
-
Save ojii/9d12c8101212e9bc60277bc00b462de0 to your computer and use it in GitHub Desktop.
Python 2 in Python 3
This file contains hidden or 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 | |
def run_in_py2(code): | |
return subprocess.check_output(['python2', '-c', code]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment