Lines Matching +full:test +full:- +full:cython

13 -----------------------------------
15 Yes, you can create built-in modules containing functions, variables, exceptions
17 :ref:`extending-index`.
23 -------------------------------------
31 .. _c-wrapper-software:
34 ----------------------------------------------
39 .. XXX make sure these all work; mention Cython
43 time-critical functions in your code, and gain a significant improvement with
45 x86-compatible processor.
47 `Cython <http://cython.org>`_ and its relative `Pyrex
64 -----------------------------------------------------
66 The highest-level function to do this is :c:func:`PyRun_SimpleString` which takes
68 ``__main__`` and returns 0 for success and -1 when an exception occurred
75 ---------------------------------------------------------
83 -----------------------------------------------
94 To test the type of an object, first make sure it isn't *NULL*, and then use
97 There is also a high-level API to Python objects which is provided by the
98 so-called 'abstract' interface -- read ``Include/abstract.h`` for further
105 -------------------------------------------------------------------
108 ``PyTuple_SetItem(t, i, o)`` -- note that this "eats" a reference count of
111 the tuple items to some value before you pass the tuple to Python code --
116 ----------------------------------------
127 This works for any object that has methods -- whether built-in or user-defined.
148 ----------------------------------------------------------------------------------------
159 .. code-block:: pycon
177 --------------------------------------------------
186 module into any namespace -- it only ensures it has been initialized and is
199 ----------------------------------------------
203 <extending-index>`. Realize that for the Python run-time system, there isn't a
204 whole lot of difference between C and C++ -- so the strategy of building a new
207 For C++ libraries, see :ref:`c-wrapper-software`.
211 --------------------------------------------------------------
219 ----------------------------
226 .. code-block:: none
232 .. code-block:: shell-session
242 --------------------------------------------------------------------------------------
248 For Red Hat, install the python-devel RPM to get the necessary files.
250 For Debian, run ``apt-get install python-dev``.
254 -------------------------------------------------------------------------------------
268 ------------------------------------------------------
288 solution then is to call :c:func:`PyParser_ParseString` and test for ``e.error``
301 /* return -1 for error, 0 for incomplete, 1 for complete */
311 return -1;
322 more input is required - by extracting the message string from the exception
354 if (NULL == line) /* Ctrl-D pressed */
363 add_history (line); /* save non-empty lines */
383 if (NULL != src) /* compiled just fine - */
386 '\n' == code[i + j - 1]) /* "... " and double '\n' */
419 else /* some non-syntax error */
439 --------------------------------------------------------------------
443 extension module using g++ (e.g., ``g++ -shared -o mymodule.so mymodule.o``).
447 ---------------------------------------------------------------------------------------------------…
449 Yes, you can inherit from built-in classes such as :class:`int`, :class:`list`,
458 -------------------------------------------------------------------------
460 You are using a version of Python that uses a 4-byte representation for Unicode
462 Python that uses a 2-byte representation for Unicode characters (the default).
465 problem is the reverse: Python was built using 2-byte Unicode characters, and
466 the extension module was compiled using a Python with 4-byte Unicode characters.
468 This can easily occur when using pre-built extension packages. RedHat Linux
469 7.x, in particular, provided a "python2" binary that is compiled with 4-byte
472 the Unicode-related format specifiers for :c:func:`Py_BuildValue` (or similar) or
478 .. code-block:: pycon