From 7cf68f3c7ddaec63dac671a2e57ddb6f668cb067 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Wed, 9 Nov 2016 10:47:41 -0500 Subject: Python 3.3 added a long to the .pyc format. --- lab/show_pyc.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lab') diff --git a/lab/show_pyc.py b/lab/show_pyc.py index 4a8801a4..0a28e4fb 100644 --- a/lab/show_pyc.py +++ b/lab/show_pyc.py @@ -17,6 +17,10 @@ def show_pyc_file(fname): modtime = time.asctime(time.localtime(struct.unpack('= (3, 3): + # 3.3 added another long to the header (size). + size = f.read(4) + print("pysize %s (%d)" % (binascii.hexlify(size), struct.unpack('