From 2da0fceba7dd70334aacbab0708a8cbdff92e31d Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Mon, 7 Jan 2008 17:09:35 +0000 Subject: Patch #602345 by Neal Norwitz and me: add -B option and PYTHONDONTWRITEBYTECODE envvar to skip writing bytecode. --- Python/sysmodule.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Python/sysmodule.c') diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 2a6a8c3e57..bd551b5abd 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -1128,6 +1128,9 @@ _PySys_Init(void) v = Py_BuildValue("(ssz)", "CPython", branch, svn_revision); PyDict_SetItemString(sysdict, "subversion", v); Py_XDECREF(v); + PyDict_SetItemString(sysdict, "dont_write_bytecode", + v = PyBool_FromLong(Py_DontWriteBytecodeFlag)); + Py_XDECREF(v); /* * These release level checks are mutually exclusive and cover * the field, so don't get too fancy with the pre-processor! -- cgit v1.2.1