Disable Python Basic Optimization (-O)

On this embedded Linux machine, I have the Python 3.3 distribution installed, which by default has an optimization option -O. This has the following effects:

  • .pyofiles are created (not .pyc) Operators
  • assert do not act
  • __debug__ set to False
  • Some IDEs seem to be unable to provide remote debugging (see WingIDE )

Is there a way to disable basic optimization on the command line? I tried setting PYTHONOPTIMIZEto an empty string, but this has no effect.

+4
source share
1 answer

Python Yocto, (Py_OptimizeFlag 1, 0).

Python -N ( Python).

, , -N, Python, Yocto ( Karoly Horvath).

+3

Source: https://habr.com/ru/post/1016332/


All Articles