Skip to content

Commit

Permalink
Trac #13952: add documentation about importing functions from cython …
Browse files Browse the repository at this point in the history
…cells to cython cells
  • Loading branch information
ppurka committed Jan 14, 2013
1 parent 1f8282b commit 2e193e6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/doc/en/developer/coding_in_cython.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ There are several ways to create and build Cython code in Sage.
to use in the notebook. Also, the output cell has a link to the C
program that was compiled to create the ``.so`` file.

#. A ``cpdef`` or ``def`` function, say ``testfunction``, defined in
a ``%cython`` cell in a worksheet can be imported and made available
in a different ``%cython`` cell within the same worksheet by
importing it as shown below::

%cython
from __main__ import testfunction

#. Create an ``.spyx`` file and attach or load it from the command
line. This is similar to creating a ``%cython`` cell in the
notebook but works completely from the command line (and not from
Expand Down

0 comments on commit 2e193e6

Please sign in to comment.