[Pythonmac-SIG] Guide to installing Unix-Python on MacOS X

Richard Gordon richard@richardgordon.net
Mon, 21 May 2001 22:54:03 -0400


At 5:37 PM -0700 5/21/01, Bob Savage wrote:
>[3] I think it is a minor thing, but your method ended up with lots of
>".pyc" and ".pyo" files. I know the reason I don't have the ".pyc" files is
>because I didn't run all of the tests (I blew it offer after the regex test
>failed -- I'll include the workaround that was mentioned earlier on the list
>next time I revise the guide). But I am unclear on what creates a ".pyo"
>file. The Beazley book says they are only used if the interpreter is run
>with the "-o" option.

hi Bob

A small point, but it's actually "-O" rather than "-o" and you 
generally wind up with all of the assorted .pyo files by running

python -O compileall.py [defaults to path, but you can specify otherwise]

You can emulate this in normal Mac Python by using the option key 
while launching compileall.py and checking the option to optimize 
bytecode.

But I frankly haven't seen much difference using this vs. plain old 
.pyc on any of several platforms- I wonder if it becomes significant 
after you cross some threshold for program length or something?


Richard Gordon
--------------------
Gordon Design
Web Design/Database Development
http://www.richardgordon.net