# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt 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) print("magic %s" % (binascii.hexlify(magic))) read_date_and_size = True if sys.version_info >= (3, 7): # 3.7 added a flags word flags = 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('