[issue5121] PyRun_InteractiveLoop disagrees with documentation?

Ben Kuhn report at bugs.python.org
Sun Feb 1 04:07:01 CET 2009


New submission from Ben Kuhn <ben.s.kuhn at gmail.com>:

The description of PyRun_InteractiveLoop(FILE * file, const char * 
filename) states that if filename is NULL, "???" will be used instead. 
In actuality, if the method is called with a NULL filename, it will 
segfault after the first command is entered.

Example:
//main.c
#include <Python.h>

int main(int argc, char * argv[]) {
	Py_Initialize();
	PyRun_InteractiveLoop(stdin, NULL);
}

//stdin
>>>import math

results in a segfault.

Python 3.0, Windows 7 beta, MinGW -LC:\Python30\libs -lpython30, 32-bit 
Intel.

----------
components: Interpreter Core
messages: 80900
nosy: bkuhn
severity: normal
status: open
title: PyRun_InteractiveLoop disagrees with documentation?
type: behavior

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5121>
_______________________________________


More information about the Python-bugs-list mailing list