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

2019-10-07 Thread PyScripter
PyScripter added the comment: >>> sys.version '2.7.16 (default, Oct 7 2019, 17:16:30) \n[GCC 7.4.0]' >>> ctypes.pythonapi.PyUnicodeUCS4_FromWideChar Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python2.7/ctypes/__init__.py", line 379, in __getattr__ func

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

2019-10-07 Thread STINNER Victor
STINNER Victor added the comment: > Is this on Ubuntu? No, only Fedora. If the issue is specific to Ubuntu, report it to the Ubuntu bug tracker. -- ___ Python tracker ___ __

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

2019-10-07 Thread PyScripter
PyScripter added the comment: Is this on Ubuntu? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

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

2019-10-07 Thread PyScripter
PyScripter added the comment: I meant PyUnicodeUCS4_FromWideChar PyUnicodeUCS2_FromWideChar. -- ___ Python tracker ___ ___ Python-b

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

2019-10-07 Thread STINNER Victor
STINNER Victor 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 0x7f

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

2019-10-07 Thread PyScripter
PyScripter added the comment: To Victor: Neither of PyUnicodeUCS2_FromWideChar or PyUnicodeUCS4_FromWideChar is exported. >>> import ctypes >>> hasattr(ctypes.pythonapi, "PyUnicode_FromWideChar") >>> hasattr(ctypes.pythonapi, "PyUnicodeUSC4_FromWideChar") >>> hasattr(ctypes.pythonapi, "PyUnic

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

2019-10-07 Thread STINNER Victor
STINNER Victor added the comment: > hasattr(ctypes.pythonapi, "PyUnicode_FromWideChar") Python 2 has a surprising ABI. The function names depending on the Unicode implementation: PyUnicodeUCS2_FromWideChar on Windows, PyUnicodeUCS4_FromWideChar on other platforms. Enjoy the ugly https://g

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

2019-10-07 Thread Zachary Ware
Zachary Ware added the comment: Given that 2.7 is reaching end-of-life in a single-digit number of months, I doubt anything will be changed here. I'll leave it up to Benjamin to make that determination, though. -- nosy: +benjamin.peterson, zach.ware

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

2019-10-07 Thread PyScripter
New submission from PyScripter : As per title PyUnicode functions, such as PyUnicode_FromWideChar, are not exported on Ubuntu and possibly other Linux systems. This is a show stopper for embedded Python. To confirm: >>> import ctypes >>> hasattr(ctypes.pythonapi, "PyUnicode_FromWideChar") I