Skip to content

Commit

Permalink
adding --annotate=2 option to ipython magic
Browse files Browse the repository at this point in the history
  • Loading branch information
realead committed Apr 13, 2019
1 parent 8f6a0e6 commit 63c1008
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Cython/Build/IpythonMagic.py
Expand Up @@ -179,8 +179,8 @@ def f(x):

@magic_arguments.magic_arguments()
@magic_arguments.argument(
'-a', '--annotate', action='store_true', default=False,
help="Produce a colorized HTML version of the source."
'-a', '--annotate', nargs='?', const=1, type=int,
help="Produce a colorized HTML version of the source. Use --annotate=2 to include complete generated C/C++-code."
)
@magic_arguments.argument(
'-+', '--cplus', action='store_true', default=False,
Expand Down
3 changes: 2 additions & 1 deletion docs/src/userguide/source_files_and_compilation.rst
Expand Up @@ -621,7 +621,7 @@ You can see them also by typing ```%%cython?`` in IPython or a Jupyter notebook.

============================================ =======================================================================================================================================

-a, --annotate Produce a colorized HTML version of the source.
-a, --annotate Produce a colorized HTML version of the source. Use ``--annotate=2`` to include the complete generated C/C++-code as well.

-+, --cplus Output a C++ rather than C file.

Expand All @@ -648,6 +648,7 @@ You can see them also by typing ```%%cython?`` in IPython or a Jupyter notebook.
--pgo Enable profile guided optimisation in the C compiler. Compiles the cell twice and executes it in between to generate a runtime profile.

--verbose Print debug information like generated .c/.cpp file location and exact gcc/g++ command invoked.

============================================ =======================================================================================================================================


Expand Down

0 comments on commit 63c1008

Please sign in to comment.