Skip to main content

Practice Python with colored grids in the IPython Notebook

Project description

ipythonblocks is a teaching tool for use with the IPython Notebook. It provides a BlockGrid object whose representation is an HTML table. Individual table cells are represented by Block objects that have .red, .green, and .blue attributes by which the color of that cell can be specified.

ipythonblocks allows students to experiment with Python flow control concepts and immediately see the effects of their code represented in a colorful, attractive way. BlockGrid objects can be indexed and sliced like 2D NumPy arrays making them good practice for learning how to access arrays.

See these demo notebooks for more on using ipythonblocks:

Install

ipythonblocks can be installed with pip:

pip install ipythonblocks

or easy_install:

easy_install ipythonblocks

However, the package is contained in a single .py file and if you prefer you can just grab ipythonblocks.py and copy it to wherever you want to use it (useful for packaging with other teaching materials).

Project details


Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
ipythonblocks-1.2.tar.gz (3.5 kB) Copy SHA256 hash SHA256 Source None Jan 13, 2013
ipythonblocks-1.2.zip (4.2 kB) Copy SHA256 hash SHA256 Source None Jan 13, 2013

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page