Re: Are .pyc files portable?

2008-11-09 Thread Lie Ryan
On Fri, 07 Nov 2008 18:36:41 -0800, Roy Smith wrote: I'm using Python as part of a test fixture for a large (mostly C++) software project. We build on a lot of different platforms, but Solaris is a special case -- we build on Solaris 8, and then run our test suite on Solaris 8, 9, and 10.

Re: Are .pyc files portable?

2008-11-08 Thread Wubbulous
Yes, apologies, I overlooked that detail. If using a different version of the binary, (i.e. 3.0 vs 2.6) you will have to re-compile the source code. -- http://mail.python.org/mailman/listinfo/python-list

Re: Are .pyc files portable?

2008-11-08 Thread John Machin
On Nov 8, 1:36 pm, Roy Smith [EMAIL PROTECTED] wrote: I'm using Python as part of a test fixture for a large (mostly C++) software project.  We build on a lot of different platforms, but Solaris is a special case -- we build on Solaris 8, and then run our test suite on Solaris 8, 9, and 10.  

Are .pyc files portable?

2008-11-07 Thread Roy Smith
I'm using Python as part of a test fixture for a large (mostly C++) software project. We build on a lot of different platforms, but Solaris is a special case -- we build on Solaris 8, and then run our test suite on Solaris 8, 9, and 10. The way the build system is set up (driven by Build Forge),

Re: Are .pyc files portable?

2008-11-07 Thread Wubbulous
Python compiles to bytecode, which means that pyc files can be interpreted by any Python executable regardless of platform. As for manual compilation to directories, the py_compile module is the one you want. Here's an example program to plug in. #test_compile.py# import py_compile print hello

Re: Are .pyc files portable?

2008-11-07 Thread Steven D'Aprano
On Fri, 07 Nov 2008 19:01:31 -0800, Wubbulous wrote: Python compiles to bytecode, which means that pyc files can be interpreted by any Python executable regardless of platform. No, bytecode isn't compatible from one version number to another. -- Steven --