[Python-Dev] __file__ and bytecode-only

Paul Moore p.f.moore at gmail.com
Sun Mar 14 17:37:57 CET 2010


On 13 March 2010 14:17, Nick Coghlan <ncoghlan at gmail.com> wrote:
> The creation side could be made a little more explicit in the PEP. We
> could also do something via the compileall module.
>
> (Pause while Nick goes and reads the source code for compileall for the
> first time ever...)
>
> Hmm - methinks the PEP actually needs to talk explicitly about the
> py_compile and compileall modules. These compile the files directly
> rather than using the import system's side-effect, so they'll need to
> understand the intricacies of the new system.

The bdist_wininst installer also compiles modules explicitly on
install (as does the python.org Windows MSI installer). I've always
assumed that this worked via compileall, but haven't checked.
Regardless, these should probably also be covered in the PEP.

Paul.


More information about the Python-Dev mailing list