Done! I added clrmagic to this wiki page. I also noticed this blog post from 2013 by Brian Granger about pythonnet (underlying library for clrmagic) and it is completely invalid anymore. None of this black magic is required anymore.
So can I delete it or mark obsolete? https://github.com/ipython/ipython/wiki/Cookbook:-IPython-and-Python.NET On Wednesday, September 14, 2016 at 5:45:16 AM UTC-5, takowl wrote: > > Neat, thanks Denis! > > It's gathering dust a bit, but we do still have an IPython extensions > index on the wiki, so feel free to add this there: > https://github.com/ipython/ipython/wiki/Extensions-Index > > Thomas > > On 14 September 2016 at 05:40, Denis Akhiyarov <[email protected] > <javascript:>> wrote: > >> As you may know there is already C# kernel for jupyter notebooks that was >> discussed previously here: >> >> https://github.com/zabirauf/icsharp >> >> But sometimes using Python and C# in separate kernels is not >> very convenient. >> >> Last week I noticed a blog post on how to use C# magic cells with >> pythonnet from IPython kernel by Xavier Dupré @sdpython >> <https://github.com/sdpython> from Microsoft: >> >> http://www.xavierdupre.fr/blog/2014-09-20_nojs.html >> >> As a result of this, we put together a package clrmagic >> <https://pypi.python.org/pypi/clrmagic> that can be installed and loaded >> into jupyter notebooks: >> >> *pip install clrmagic* >> >> *%reload_ext clrmagic* >> >> Here is a small demo: >> %%CS mypower System.dll >> public static double mypower(double x, double y) >> { >> if (y == 0) return 1.0; >> return System.Math.Pow(x,y); >> } >> >> mypower(3.0,3.0) >> 27.0 >> >> >> Note that clrmagic works and is tested both on Windows (.NET) and Linux >> (Mono)! It should also work on OSX (Mono), but I have not tested. >> >> Currently the source code is hosted here: >> >> https://github.com/denfromufa/clrmagic >> >> >> The clrmagic was modeled after fortran magic which uses f2py to extend >> Python with Fortran. >> >> >> Regards, >> >> Denis >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Project Jupyter" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/jupyter/31f2a31c-355c-4396-ba5e-74009758de6c%40googlegroups.com >> >> <https://groups.google.com/d/msgid/jupyter/31f2a31c-355c-4396-ba5e-74009758de6c%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "Project Jupyter" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/c81a0e5e-b2c7-4a4d-9bd6-52717705dec8%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
