DlangScience / PydMagic

Ipython/Jupyter magic for inline D code
BSD 3-Clause "New" or "Revised" License
20 stars 3 forks source link

No need to track loaded state. #1

Closed Carreau closed 9 years ago

Carreau commented 9 years ago
def load_ipython_extension(ip):
    global _loaded
    if not _loaded:
        ip.register_magics(PydMagics)
        _loaded = True

Any recent enough IPython take care of that for you. Define a unload_ipython_extension if you want a specific step to be take care of during reload.

John-Colvin commented 9 years ago

Thanks for the advice

https://github.com/DlangScience/PydMagic/pull/5

John-Colvin commented 9 years ago

Fixed by https://github.com/DlangScience/PydMagic/pull/7