Title: PyRun_InteractiveLoop disagrees with documentation?
Type: behavior Stage: needs patch
Components: Documentation Versions: Python 3.1, Python 3.2, Python 2.7
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: BreamoreBoy, bkuhn, docs@python, georg.brandl
Priority: normal Keywords:

Created on 2009-02-01 03:06 by bkuhn, last changed 2010-10-17 11:03 by georg.brandl. This issue is now closed.

Messages (3)
msg80900 - (view) Author: Ben Kuhn (bkuhn) Date: 2009-02-01 03:06
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.

#include <Python.h>

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

>>>import math

results in a segfault.

Python 3.0, Windows 7 beta, MinGW -LC:\Python30\libs -lpython30, 32-bit 
msg109726 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2010-07-09 13:07
I'm assuming that this will be a doc change, in which case it applies to all versions.  The comment is actually against PyRun_InteractiveLoopFlags.
msg118936 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-10-17 11:03
Fixed in r85635.
Date User Action Args
2010-10-17 11:03:27georg.brandlsetstatus: open -> closed

nosy: + georg.brandl
messages: + msg118936

resolution: fixed
2010-07-09 13:07:37BreamoreBoysetassignee: docs@python
components: + Documentation, - Interpreter Core
versions: + Python 3.1, Python 2.7, Python 3.2, - Python 3.0
nosy: + docs@python, BreamoreBoy

messages: + msg109726
stage: needs patch
2009-02-01 03:07:50bkuhnsetversions: + Python 3.0
2009-02-01 03:06:59bkuhncreate