How to install with -O?

Aahz aahz at pythoncraft.com
Thu Nov 28 19:56:23 EST 2002


In article <mailman.1038511660.30945.python-list at python.org>,
Michael Gilfix  <mgilfix at eecs.tufts.edu> wrote:
>
>  Hi all. I've been using __debug__ in my python programs with the
>hope to byte-compile my programs with -O on install and remove the
>__debug__ code. However, I haven't figured out quite how to do this
>with distutils, and some searching through the documentation didn't
>reveal anything. Has anyone solved this problem?

Unfortunately, there are only two ways to force optimized mode: running
"python -O" and setting PYTHONOPTIMIZE.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"If you don't know what your program is supposed to do, you'd better not
start writing it."  --Dijkstra



More information about the Python-list mailing list