-O
is a compiler flag, you can't set it at runtime because the script already has been compiled by then.
Python has nothing comparable to compiler macros like #if
.
Simply write a start_my_project.sh
script that sets these flags.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…