{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# IPython Intro Breakout Session\n", "\n", "Interactive exploration\n", "-----------------------\n", "\n", "I have shown you the Zen of Python. But if you search through all of the python\n", "source code, you will not find the word \"Zen\" anywhere.\n", "\n", "\n", "\n", "Use ``, `?` and `??` on the `this` module to decode this string:" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "import this\n", "\n", "secret = \"Tbbq Wbo! abj tb fvta hc sbe gur znvyvat yvfg bire ng vclguba.bet\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Configuration file options\n", "--------------------------\n", "\n", "Create the stub default profile (if you haven't already)\n", "\n", "\n", "\n", " $ ipython profile create\n", "\n", "\n", "\n", "This will create the stubs for the default profile\n", "\n", "now you can change these defaults.\n", "\n", "\n", "\n", "To find where your profile is stored:\n", "\n", "\n", "\n", " In [1]: import IPython\n", "\n", " In [2]: IPython.utils.path.locate_profile()\n", "\n", "\n", "\n", "Example:if you want the `_` and `__` methods to show up by default when doing tab-completion \n", "\n", "\n", "\n", " %config IPCompleter.omit__names\n", "\n", "Another example: you can add your own startup message (or execute your desired commands at startup) like I have:\n", "\n", " ~/.ipython/profile_default/startup/README\n", "\n", "\n", "\n", "\n", "\n", "\n", " " ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "import IPython\n", "IPython.utils.path.locate_profile()" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "IPython.utils.path.locate_profile()+'/startup/README'" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "%pycat IPython.utils.path.locate_profile()+'/startup/README'" ] } ], "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.4.3" } }, "nbformat": 4, "nbformat_minor": 0 }