sys.flags.optimize can't be set in runtime

This commit is contained in:
Oleksii Shevchuk 2017-04-25 10:47:05 +03:00
parent cd4c1dde1a
commit 61dc5fc6f4
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@ if __name__=="__main__":
remove_stdout if not args.debug else 'print "DEBUG"\n', remove_stdout if not args.debug else 'print "DEBUG"\n',
'import sys; sys.path=[]; sys.path_hooks=[]; sys.meta_path=[];' + ( 'import sys; sys.path=[]; sys.path_hooks=[]; sys.meta_path=[];' + (
'sys.argv = [];' if not args.pass_argv else '' 'sys.argv = [];' if not args.pass_argv else ''
) + 'sys.prefix = ""; sys.flags.optimize=1;\n', ) + 'sys.prefix = "";\n',
pupyload.format('pupyimporter', repr(pupyimporter)), pupyload.format('pupyimporter', repr(pupyimporter)),
'import pupyimporter\n' 'import pupyimporter\n'
'pupyimporter.install({})\n'.format(args.debug), 'pupyimporter.install({})\n'.format(args.debug),