[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Correct location of .py and .pyc files



Hi,

Josselin Mouette <josselin.mouette@ens-lyon.org> wrote:

> Le dim 16/11/2003 à 11:34, Matthias Klose a écrit :
>> There is no reason why /usr/share/<module> should be disallowed.
>
> That depends on whether .pyo files really are architecture-independent.
> At least the generated files are different on different architectures.

Do you have a reference for this? I googled a little bit but did not
find any reliable source for this information. In fact, the Python (2.3)
tutorial implies the contrary (for the current optimizer, not as an
atemporal guarantee, though):

,----
| When the Python interpreter is invoked with the -O flag, optimized
| code is generated and stored in .pyo files. The optimizer currently
| doesn't help much; it *only removes assert statements*.
`----

(emphasis is mine)

Also, that same tutorial says a few lines above the preceding quote that
.pyc files are platform independent, which is reassuring in our case,
although it does not say much about .pyo files...

-- 
Florent



Reply to: