PEP 3147 - new .pyc format

Martin v. Loewis martin at
Sun Jan 31 11:13:06 CET 2010

> Naming files using magic numbers is really beyond me. The fact that the
> above needs comments to explain what's what already shows to me that
> there's a problem with this naming scheme. What if for one reason or
> another I want to delete all pyc files for Python 2.5? Where do I look
> up the magic number?

py> import imp, binascii
py> binascii.hexlify(imp.get_magic())

(note: this is on a little-endian system)


More information about the Python-list mailing list