From c47760424ac77f13c736dca23e075eaf5eccb817 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sun, 1 Nov 2015 05:50:05 -0500 Subject: Make show_pyc runnable on Python 3 --- lab/show_pyc.py | 51 +++++++++++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 22 deletions(-) (limited to 'lab') diff --git a/lab/show_pyc.py b/lab/show_pyc.py index 147c6ff8..e272ef8e 100644 --- a/lab/show_pyc.py +++ b/lab/show_pyc.py @@ -1,15 +1,22 @@ # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt -import dis, marshal, struct, sys, time, types +import binascii +import dis +import marshal +import struct +import sys +import time +import types + def show_pyc_file(fname): f = open(fname, "rb") magic = f.read(4) moddate = f.read(4) modtime = time.asctime(time.localtime(struct.unpack('