summaryrefslogtreecommitdiff
path: root/Python/sysmodule.c
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-01-07 17:09:35 +0000
committerGeorg Brandl <georg@python.org>2008-01-07 17:09:35 +0000
commit2da0fceba7dd70334aacbab0708a8cbdff92e31d (patch)
treef93838b60f3c3216db03eaa24b32f4dc92389230 /Python/sysmodule.c
parentb3255ed8c937510076b641db28ab052ddaee1178 (diff)
downloadcpython-git-2da0fceba7dd70334aacbab0708a8cbdff92e31d.tar.gz
Patch #602345 by Neal Norwitz and me: add -B option and PYTHONDONTWRITEBYTECODE envvar to skip writing bytecode.
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r--Python/sysmodule.c3
1 files changed, 3 insertions, 0 deletions
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!