You can use: exe = EXE( pyz, a.scripts, [('O', None, 'OPTION'), ('O', None, 'OPTION')], ...
but, whilst it does set sys.flags.optimize to 2, it doesn’t remove either the assertions or docstrings since they need to happen at compile time. You used to be able to use python -OO -m PyInstaller your-code.py but pycparser (one of PyInstaller’s indirect Windows-only dependencies) doesn’t allow it now. That said, -OO mode is a waste of time. Since the docstrings are small and in a PyInstaller application get compressed, you’re looking at about ~0.1% reduction in application size. -- You received this message because you are subscribed to the Google Groups "PyInstaller" group. To unsubscribe from this group and stop receiving emails from it, send an email to pyinstaller+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/3e50cd3b-265f-4865-9023-767664bd3057n%40googlegroups.com.