Re: Calling Python macro from ctypes

2013-08-13 Thread Steven D'Aprano
On Mon, 12 Aug 2013 13:42:14 +0200, Peter Otten wrote: Steven D'Aprano wrote: Is it possible to call a Python macro from ctypes? For example, Python 3.3 introduces some new macros for querying the internal representation of strings: http://www.python.org/dev/peps/pep-0393/#new-api [...]

Re: Calling Python macro from ctypes

2013-08-13 Thread Stefan Behnel
Steven D'Aprano, 13.08.2013 08:25: On Mon, 12 Aug 2013 13:42:14 +0200, Peter Otten wrote: Steven D'Aprano wrote: Is it possible to call a Python macro from ctypes? For example, Python 3.3 introduces some new macros for querying the internal representation of strings:

Re: Calling Python macro from ctypes

2013-08-13 Thread Steven D'Aprano
On Tue, 13 Aug 2013 10:11:29 +0200, Stefan Behnel wrote: Steven D'Aprano, 13.08.2013 08:25: On Mon, 12 Aug 2013 13:42:14 +0200, Peter Otten wrote: Steven D'Aprano wrote: Is it possible to call a Python macro from ctypes? For example, Python 3.3 introduces some new macros for querying the

Re: Calling Python macro from ctypes

2013-08-13 Thread Peter Otten
Steven D'Aprano wrote: On Mon, 12 Aug 2013 13:42:14 +0200, Peter Otten wrote: Steven D'Aprano wrote: Is it possible to call a Python macro from ctypes? For example, Python 3.3 introduces some new macros for querying the internal representation of strings:

Calling Python macro from ctypes

2013-08-12 Thread Steven D'Aprano
Is it possible to call a Python macro from ctypes? For example, Python 3.3 introduces some new macros for querying the internal representation of strings: http://www.python.org/dev/peps/pep-0393/#new-api So I try this in 3.3: py import ctypes py ctypes.pythonapi.PyUnicode_MAX_CHAR_VALUE

Re: Calling Python macro from ctypes

2013-08-12 Thread Peter Otten
Steven D'Aprano wrote: Is it possible to call a Python macro from ctypes? For example, Python 3.3 introduces some new macros for querying the internal representation of strings: http://www.python.org/dev/peps/pep-0393/#new-api So I try this in 3.3: py import ctypes py

Re: Calling Python macro from ctypes

2013-08-12 Thread Dave Angel
Peter Otten wrote: Steven D'Aprano wrote: Is it possible to call a Python macro from ctypes? For example, Python 3.3 introduces some new macros for querying the internal representation of strings: http://www.python.org/dev/peps/pep-0393/#new-api So I try this in 3.3: py import