def loadExtensionsAndCapturers(): extNames = ["ROOTaaS.iPyROOT." + name for name in ["cppmagic"]] ip = get_ipython() extMgr = ExtensionManager(ip) for extName in extNames: extMgr.load_extension(extName) cppcompleter.load_ipython_extension(ip) for capture in captures: capture.register()
def toCpp(): ''' Change the mode of the notebook to CPP. It is preferred to use cell magic, but this option is handy to set up servers and for debugging purposes. ''' cpptransformer.load_ipython_extension(get_ipython()) cppcompleter.load_ipython_extension(get_ipython()) # Change highlight mode IPython.display.display_javascript(jsDefaultHighlight.format(mimeType = cppMIME), raw=True) print "Notebook is in Cpp mode"
def toCpp(): ''' Change the mode of the notebook to CPP. It is preferred to use cell magic, but this option is handy to set up servers and for debugging purposes. ''' cpptransformer.load_ipython_extension(get_ipython()) cppcompleter.load_ipython_extension(get_ipython()) # Change highlight mode IPython.display.display_javascript( jsDefaultHighlight.format(mimeType=cppMIME), raw=True) print "Notebook is in Cpp mode"
def loadExtensionsAndCapturers(): global captures extNames = ["JupyROOT.magics." + name for name in ["cppmagic","jsrootmagic"]] ip = get_ipython() extMgr = ExtensionManager(ip) for extName in extNames: extMgr.load_extension(extName) cppcompleter.load_ipython_extension(ip) captures.append(StreamCapture()) captures.append(CaptureDrawnPrimitives()) for capture in captures: capture.register()