Skip to content

Instantly share code, notes, and snippets.

@paolodina
Created September 6, 2014 23:10
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 paolodina/28b2558b717d7c134c14 to your computer and use it in GitHub Desktop.
Save paolodina/28b2558b717d7c134c14 to your computer and use it in GitHub Desktop.
paolo@tk:~/$ hg diff
diff --git a/lib-python/2.7/compileall.py b/Lib/compileall.py
rename from lib-python/2.7/compileall.py
rename to Lib/compileall.py
--- a/lib-python/2.7/compileall.py
+++ b/Lib/compileall.py
@@ -86,7 +86,7 @@
try:
mtime = int(os.stat(fullname).st_mtime)
expect = struct.pack('<4sl', imp.get_magic(), mtime)
- cfile = fullname + (__debug__ and 'c' or 'o')
+ cfile = fullname.replace('.py', '$py.class')
with open(cfile, 'rb') as chandle:
actual = chandle.read(8)
if expect == actual:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment