{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Groovy Magic for Python Kernel\n", "\n", "This experimental feature is just a beginning of system of magics for polyglot programming.\n", "See [#6477](https://github.com/twosigma/beakerx/issues/6477)\n", "and [#6279](https://github.com/twosigma/beakerx/issues/6279)." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%%groovy\n", "println(\"stdout works\")\n", "f = {it + \" work\"}\n", "f(\"results\")" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%%groovy\n", "new Plot(title:\"plots work\", initHeight: 200)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%%groovy\n", "[a:\"tables\", b:\"work\"]" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%%groovy\n", "\"errors work\"/1" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%%groovy\n", "HTML(\"

HTML works

\")" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.2" } }, "nbformat": 4, "nbformat_minor": 1 }