Skip to main content

IPython cell magic to use .NET languages

Project description

IPython cell magic to use .NET languages (C#, VB.NET, F#) from jupyter notebooks:

https://pypi.python.org/pypi/clrmagic/

Based on a blog post from Xavier Dupré @sdpython:

http://www.xavierdupre.fr/blog/2014-09-20_nojs.html

Simple wheel installation:

pip install clrmagic

Launch Jupyter notebook with IPython kernel:

jupyter notebook

In open notebook load clrmagic extension:

%reload_ext clrmagic

Magic cell with C# code:

%%CS mypower System.dll
public static double mypower(double x, double y)
{
  if (y == 0) return 1.0 ;
  return System.Math.Pow(x,y) ;
}
<function clrmagic.create_cs_function.<locals>.<lambda>>

Next evaluate in normal IPython cell:

mypower(3.0,3.0)
27.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clrmagic-0.0.1a2.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

clrmagic-0.0.1a2-py2.py3-none-any.whl (5.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file clrmagic-0.0.1a2.tar.gz.

File metadata

  • Download URL: clrmagic-0.0.1a2.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for clrmagic-0.0.1a2.tar.gz
Algorithm Hash digest
SHA256 efe65060727c5ed92f96869f35d8d5207ad5373c82f339670ce66685c40e0c07
MD5 61e5d6b476ce514176f52718f21f0beb
BLAKE2b-256 8ab557d3c62b064b2699318b8f2baa240685c414e50034ba83a4df8e230d8649

See more details on using hashes here.

File details

Details for the file clrmagic-0.0.1a2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for clrmagic-0.0.1a2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b3ed6ff24059c9d59e9139b39363d538e261397ae0c8ad566c98254f71969f32
MD5 8c8faec97c0fe484b31cd3fae51c9e8d
BLAKE2b-256 2a8a0fa3e5ec55cc2b80dc0fe12645810b3f819065801a3228a46ba845c1d2ef

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page