You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've hacked up a little function to display the output of cython -a
defcython_annotate(path):
importosos.system("cython.py -a {path}".format(path=path))
withopen(os.path.splitext(path)[0] +".html") asistream:
html=istream.read()
returnhtml#
At present this can be called as shown below if you know the filename of the .pyx file: from IPython.display import HTML HTML(cython_annotate(path_to_pyx_file))
It would be great if this functionality could be added as part of the cython extension.
Cheers,
Dave
The text was updated successfully, but these errors were encountered:
Hi Dave, We think this is a fantastic idea as well. Our original plan was to just have this be an optional flag on the existing magic, i.e. %%cython -a. See #1976.
I'm going to close this issue as a duplicate, but link back here since you have some good sample code.
No worries! If you want to try your hand at submitting a pull request we'll be happy to review it. Otherwise it'll take a few weeks but we should get to the other issue.
I've hacked up a little function to display the output of
cython -a
At present this can be called as shown below if you know the filename of the .pyx file:
from IPython.display import HTML
HTML(cython_annotate(path_to_pyx_file))
It would be great if this functionality could be added as part of the cython extension.
Cheers,
Dave
The text was updated successfully, but these errors were encountered: