New submission from Graham Dumpleton <[EMAIL PROTECTED]>:

Because the readline module uses PyGILState_Ensure() to facilitate triggering 
callbacks into Python code, this would make the ability to use the hook 
functions incompatible with use in sub interpreters.

If this is the case, then that readline module cannot be used in sub 
interpreters should be documented if not already.

Better still, attempts to register hooks from sub interpreters should result in 
an exception. Further, when in use, in sub interpreter, callback hooks should 
also not be called if defined, because if defined they would be the hooks from 
the main interpreter since variables holding the hooks are static C variables 
and shared across all interpreters.

This issue derived from reading of code only and not tested in real program.

----------
components: Interpreter Core
messages: 75201
nosy: grahamd
severity: normal
status: open
title: Multiple interpreters and readline module hook functions.
versions: Python 2.5, Python 3.0

_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue4202>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to