Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom magic command #1

Closed
kangwonlee opened this issue Nov 5, 2018 · 3 comments
Closed

Custom magic command #1

kangwonlee opened this issue Nov 5, 2018 · 3 comments
Assignees
Labels
enhancement New feature or request question Further information is requested

Comments

@kangwonlee
Copy link
Owner

kangwonlee commented Nov 5, 2018

Motivation

  • Wouldn't it be nice if we can include some C/C++ source codes in the ipython notebook files?
  • Similar to %%cython
  • Let's call it %%cpp
  • Build options as command line option

Need more info

  • How to set compiler command line options?

How to write a magic command?

How to make it easy to deploy?

  • So that a user does not have to build the whole jupyter notebook?
  • According to kmario23, one could try a custom magic using following command
$ python setup.py develop 

How to test the magic command?

Where to put the custom magic command?

  • As a subtree of a different repository?
  • within a .ipynb file under a subfolder may add the path as follows?
import os
import sys

sys.path.append(
    os.path.abspath(
        os.path.join(os.path.dirname(__file__), os.pardir, <custom magic>)
    )
)
  • setuptools would deal with this problem too
@kangwonlee kangwonlee added the enhancement New feature or request label Jun 9, 2019
@kangwonlee kangwonlee self-assigned this Jun 9, 2019
@kangwonlee kangwonlee added the question Further information is requested label Jun 9, 2019
@kangwonlee
Copy link
Owner Author

kangwonlee commented Jun 10, 2019

@kangwonlee
Copy link
Owner Author

  • 5510caa could build, run, and capture the output strings

@kangwonlee
Copy link
Owner Author

kangwonlee/2018pycpp#34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant