pyc / pyo architecture independent?

T

Terry Hancock

This question was brought up by packagers trying to set
policy for including Python modules in Debian Gnu/Linux:

Are the .pyc / .pyo files safely architecture independent?
(I.e. are they now, and are they likely or even guaranteed
to remain so?).

I know the bytecode can change between interpreter
versions and other interpreters like Jython, Stackless, and
PyPy (does that exist yet?) may not even choose to
make them. But given that the same interpreter is made
available, will they work on, say, an ARM processor,
a 68K, and a i386 sharing them on the same network?

Thanks for any comments,
Terry
 
S

Skip Montanaro

Terry> I know the bytecode can change between interpreter versions and
Terry> other interpreters like Jython, Stackless, and PyPy (does that
Terry> exist yet?) may not even choose to make them. But given that the
Terry> same interpreter is made available, will they work on, say, an
Terry> ARM processor, a 68K, and a i386 sharing them on the same
Terry> network?

Yes.

Skip
 
A

Aahz

Are the .pyc / .pyo files safely architecture independent? (I.e. are
they now, and are they likely or even guaranteed to remain so?).

Yes. I don't know about future guarantees, but you may be assured that
it would be a Big Change if that were no longer true.
I know the bytecode can change between interpreter versions and other
interpreters like Jython, Stackless, and PyPy (does that exist yet?)
may not even choose to make them. But given that the same interpreter
is made available, will they work on, say, an ARM processor, a 68K, and
a i386 sharing them on the same network?

Yes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,479
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top