Mailing List Archive

[issue5121] PyRun_InteractiveLoop disagrees with documentation?
New submission from Ben Kuhn <ben.s.kuhn@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@bugs.python.org>
<http://bugs.python.org/issue5121>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue5121] PyRun_InteractiveLoop disagrees with documentation? [ In reply to ]
Changes by Ben Kuhn <ben.s.kuhn@gmail.com>:


----------
versions: +Python 3.0

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue5121>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com