[issue38398] PyUnicode functions are not exported by python 2 in Ubuntu

STINNER Victor report at bugs.python.org
Mon Oct 7 12:31:32 EDT 2019


STINNER Victor <vstinner at python.org> added the comment:

ctypes.pythonapi is kind of magic. I'm not sure if hasattr() is supposed to work on it. But that works for me:

$ python2
Python 2.7.16 (default, Apr 30 2019, 15:54:43) 
>>> import ctypes
>>> ctypes.pythonapi.PyUnicodeUCS4_FromWideChar
<_FuncPtr object at 0x7f1b9c155ef0>

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38398>
_______________________________________


More information about the Python-bugs-list mailing list