[Python-Dev] Weird message to stderr
M.-A. Lemburg
mal@lemburg.com
Wed, 13 Jun 2001 14:53:50 +0200
Running Python 2.1 using a .pyc file I get these weird messages
printed to stderr:
run_pyc_file: nested_scopes: 0
These originate in pythonrun.c:
static PyObject *
run_pyc_file(FILE *fp, char *filename, PyObject *globals, PyObject *locals,
PyCompilerFlags *flags)
{
PyCodeObject *co;
PyObject *v;
long magic;
long PyImport_GetMagicNumber(void);
magic = PyMarshal_ReadLongFromFile(fp);
if (magic != PyImport_GetMagicNumber()) {
PyErr_SetString(PyExc_RuntimeError,
"Bad magic number in .pyc file");
return NULL;
}
(void) PyMarshal_ReadLongFromFile(fp);
v = PyMarshal_ReadLastObjectFromFile(fp);
fclose(fp);
if (v == NULL || !PyCode_Check(v)) {
Py_XDECREF(v);
PyErr_SetString(PyExc_RuntimeError,
"Bad code object in .pyc file");
return NULL;
}
co = (PyCodeObject *)v;
v = PyEval_EvalCode(co, globals, locals);
if (v && flags) {
if (co->co_flags & CO_NESTED)
flags->cf_nested_scopes = 1;
fprintf(stderr, "run_pyc_file: nested_scopes: %d\n",
flags->cf_nested_scopes);
}
Py_DECREF(co);
return v;
}
Is this is left over debug printf or should I be warned
in some way ?
--
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
______________________________________________________________________
Company & Consulting: http://www.egenix.com/
Python Software: http://www.lemburg.com/python/