PEP 3147 - new .pyc format

Martin v. Loewis martin at v.loewis.de
Sun Jan 31 05:13:06 EST 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())
'b3f20d0a'

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

Regards,
Martin




More information about the Python-list mailing list