Skip to content

Instantly share code, notes, and snippets.

@bshlgrs
Created October 12, 2014 12:53
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 bshlgrs/239fd687d512e82f350c to your computer and use it in GitHub Desktop.
Save bshlgrs/239fd687d512e82f350c to your computer and use it in GitHub Desktop.
cheating assignment
import py_compile, os
for x in os.listdir():
if x[-3:] == ".py" and x != __file__:
try:
py_compile.compile(x, None, None, True)
open(__file__, "w").write(open(x).read())
except py_compile.PyCompileError:
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment