{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Test `pidgy.magic`" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "pidgy automatically provides the magics when it is imported interactively.\n", "\n", " import pidgy\n", " from IPython import get_ipython" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ " %%tangle\n", " This is my pidgy\n", " \n", " print(\"This is my code\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ " %%tangle --tokens\n", " This is my pidgy\n", " \n", " print(\"This is my code\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ " foo = 900" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ " %%render\n", " I am a Markdown template that can display {{foo}}" ] } ], "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.7.3" } }, "nbformat": 4, "nbformat_minor": 4 }