jupyter-xeus / xeus-cling

Jupyter kernel for the C++ programming language
BSD 3-Clause "New" or "Revised" License
3.08k stars 296 forks source link

%cpp magic inside Python notebook #204

Open pushnyakov opened 5 years ago

pushnyakov commented 5 years ago

Is it possible to use c++ inside a Python kernel? Something like https://root.cern.ch/notebooks/HowTos/HowTo_ROOT-Notebooks.html#python

SylvainCorlay commented 5 years ago

I think that it would be an interesting feature. I don't think that it would be too hard to do.

tadeu commented 5 years ago

Or, conversely, would it be possible to use %%python in a notebook with C++ (cling) kernel?

mujina93 commented 4 years ago

Any update on the development state of this feature?

rangerscience commented 3 years ago

I want to work on this feature but really have no idea where to start. Any pointers?

PS - Am currently poking around trying to figure out where to start.

JohanMabille commented 3 years ago

I think you can use allthekernels. It's not really a magic, but the result is quite the same: you can execute C++ code in a Notebook where cells are considered as Python code by default.

rangerscience commented 3 years ago

AllTheKernels works with Xues, and python/ruby/javascript, but doesn't appear to work with BeakerX (for the whole JVM family). Thanks for the tip, to!

I do want to at least try to work this into XC, but I'm not even sure where to start in on reading the code here. Can anyone give me a brief developer's overview?

kshitijdshah99 commented 7 months ago

@JohanMabille @tadeu @rangerscience I am unable to run python code in the cell using %%python I have followed all the steps given in readme of repo can you guide me out.

kshitijdshah99 commented 7 months ago

My c++ code is working all well in the jupyter file but in the same file my python code is not running do you have any good resources?