Index: Include/pydebug.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pydebug.h,v retrieving revision 2.19 diff -c -r2.19 pydebug.h *** Include/pydebug.h 6 Dec 2001 06:23:25 -0000 2.19 --- Include/pydebug.h 12 Jan 2003 18:59:50 -0000 *************** *** 16,21 **** --- 16,22 ---- extern DL_IMPORT(int) Py_UnicodeFlag; extern DL_IMPORT(int) Py_IgnoreEnvironmentFlag; extern DL_IMPORT(int) Py_DivisionWarningFlag; + extern DL_IMPORT(int) Py_ReadOnlyBytecodeFlag; /* _XXX Py_QnewFlag should go away in 2.3. It's true iff -Qnew is passed, on the command line, and is used in 2.2 by ceval.c to make all "/" divisions true divisions (which they will be in 2.3). */ Index: Modules/main.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/main.c,v retrieving revision 1.61.6.2 diff -c -r1.61.6.2 main.c *** Modules/main.c 17 Mar 2002 19:42:18 -0000 1.61.6.2 --- Modules/main.c 12 Jan 2003 18:59:50 -0000 *************** *** 25,31 **** static int orig_argc; /* command line options */ ! #define BASE_OPTS "c:dEhiOQ:StuUvVW:xX" #ifndef RISCOS #define PROGRAM_OPTS BASE_OPTS --- 25,31 ---- static int orig_argc; /* command line options */ ! #define BASE_OPTS "c:dEhiOQ:RStuUvVW:xX" #ifndef RISCOS #define PROGRAM_OPTS BASE_OPTS *************** *** 55,60 **** --- 55,61 ---- -O : optimize generated bytecode (a tad; also PYTHONOPTIMIZE=x)\n\ -OO : remove doc-strings in addition to the -O optimizations\n\ -Q arg : division options: -Qold (default), -Qwarn, -Qwarnall, -Qnew\n\ + -R : don't write .py[co] files on import\n\ -S : don't imply 'import site' on initialization\n\ -t : issue warnings about inconsistent tab usage (-tt: issue errors)\n\ -u : unbuffered binary stdout and stderr (also PYTHONUNBUFFERED=x)\n\ *************** *** 185,190 **** --- 186,195 ---- case 'O': Py_OptimizeFlag++; + break; + + case 'R': + Py_ReadOnlyBytecodeFlag++; break; case 'S': Index: Python/import.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/import.c,v retrieving revision 2.192.6.2 diff -c -r2.192.6.2 import.c *** Python/import.c 1 Jun 2002 18:26:22 -0000 2.192.6.2 --- Python/import.c 12 Jan 2003 18:59:52 -0000 *************** *** 782,788 **** if (Py_VerboseFlag) PySys_WriteStderr("import %s # from %s\n", name, pathname); ! write_compiled_module(co, cpathname, mtime); } m = PyImport_ExecCodeModuleEx(name, (PyObject *)co, pathname); Py_DECREF(co); --- 782,789 ---- if (Py_VerboseFlag) PySys_WriteStderr("import %s # from %s\n", name, pathname); ! if (!Py_ReadOnlyBytecodeFlag) ! write_compiled_module(co, cpathname, mtime); } m = PyImport_ExecCodeModuleEx(name, (PyObject *)co, pathname); Py_DECREF(co); Index: Python/pythonrun.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/pythonrun.c,v retrieving revision 2.153.6.4 diff -c -r2.153.6.4 pythonrun.c *** Python/pythonrun.c 20 Nov 2002 02:38:10 -0000 2.153.6.4 --- Python/pythonrun.c 12 Jan 2003 18:59:52 -0000 *************** *** 56,61 **** --- 56,62 ---- int Py_VerboseFlag; /* Needed by import.c */ int Py_InteractiveFlag; /* Needed by Py_FdIsInteractive() below */ int Py_NoSiteFlag; /* Suppress 'import site' */ + int Py_ReadOnlyBytecodeFlag; /* Suppress writing bytecode files (*.py[co]) */ int Py_UseClassExceptionsFlag = 1; /* Needed by bltinmodule.c: deprecated */ int Py_FrozenFlag; /* Needed by getpath.c */ int Py_UnicodeFlag = 0; /* Needed by compile.c */