Skip to content

Instantly share code, notes, and snippets.

@17twenty
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 17twenty/9661270 to your computer and use it in GitHub Desktop.
Save 17twenty/9661270 to your computer and use it in GitHub Desktop.
Force Python to compile to pyc
python -m compileall stackBlown.py
# You could also do this programatically
# >>> import py_compile
# >>> py_compile.compile('stackBlown.py')
#
# Note that you need to use Python to run the pyc file as it's not an executable
#
# The dis module would even let you pull the resultant bytecode back out again!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment