Skip to content

pidgy IPython extensions¤

pidgy is meant to support you while authoring code. we add some features to the conventional IPython shell to improve your experience getting your ideas onto the screen. below we discuss the following features:

  • json positive so you can copy and paste json data without a hiccup.
  • top-level return statement for easier access to displays
  • merge sys.modules with the user namespace

by adding names to the user namespace we enrich the interactive completion in the authoring experience.

json positive¤

by adding true, false, null to the built-ins python can accept json.

(True, False, None)

top level return¤

top level return statements act as a print/display statement

222

beep, beep

IPython displays¤

by default, pidgy includes all of IPythons default display classes so it is easier to add multimedia to your stories.

IPython.core.display.HTML
IPython.core.display.Markdown
IPython.core.display.Math
IPython.lib.display.YouTubeVideo

Access to sys.modules¤

naming is hard they say, but if we have more names, we don't have to think as hard. when working in IPython there are quite a few modules imported that would be useful during development. to help you write we've included the sys.modules for quick access to tools without the burden of writing imports. we encourage you to add explicit imports later, but let's not get in the way of your flow.

<module 'textwrap' from '/home/tbone/mambaforge/lib/python3.9/textwrap.py'>
<module 'argparse' from '/home/tbone/mambaforge/lib/python3.9/argparse.py'>
<module 'operator' from '/home/tbone/mambaforge/lib/python3.9/operator.py'>
<module 'IPython' from '/home/tbone/mambaforge/lib/python3.9/site-packages/IPython/__init__.py'>
<module 'inspect' from '/home/tbone/mambaforge/lib/python3.9/inspect.py'>

Shebangs¤

we add the ability to execute cells with shebang statements. this feature is included to introduce folks to the concept of shebangs in a modern interface. when they encountered this feature in practice it can be more familiar.

I'm a print statement a script with the name: __main__ from ipython-6jy979yyk.py