Skip to main content

Practice Python with colored grids in the IPython Notebook

Project description

Travis-CI Coveralls PyPI

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).

Dependencies

Required dependencies:

Optional dependencies:

Testing dependencies:

  • pytest >= 2.3, (for the test suite, see below)

  • responses >= 0.1

  • mock (dependency of responses)

Demo dependencies:

  • PIL (for starry_night_to_text.ipynb)

Testing

The test suite is written using pytest, so you can run the test suite with:

py.test

Project details


Download files

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

Source Distributions

ipythonblocks-1.7.0.zip (20.5 kB view details)

Uploaded Source

ipythonblocks-1.7.0.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

ipythonblocks-1.7.0-py2.py3-none-any.whl (14.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file ipythonblocks-1.7.0.zip.

File metadata

  • Download URL: ipythonblocks-1.7.0.zip
  • Upload date:
  • Size: 20.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for ipythonblocks-1.7.0.zip
Algorithm Hash digest
SHA256 c1f9e2053a690cccb70c6aa8c37b4d37e2b174cc3706c13fb97a14e960212ee7
MD5 95e23361faf08cbea8bfec57247eece0
BLAKE2b-256 68ebd3fe020b284dbbd711ce09644fd7dfaeacc24dc68f63d962b0ea11dfb3a4

See more details on using hashes here.

File details

Details for the file ipythonblocks-1.7.0.tar.gz.

File metadata

File hashes

Hashes for ipythonblocks-1.7.0.tar.gz
Algorithm Hash digest
SHA256 441877da59d13800b26f73fbe7d5522e3390a1d2a82f7a8ec0675a46ba6b5c4d
MD5 cf892b14cca762ff4b74ed59366701a1
BLAKE2b-256 1aa1ad38783185b9e29c48e8ad4c5adaa86d66f4fffc7b1bba38f7fc25730cb2

See more details on using hashes here.

File details

Details for the file ipythonblocks-1.7.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for ipythonblocks-1.7.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8c741b888f3f370ca52b9fd89f91873e18d722c151ba8dfeb94a317494c66f88
MD5 83a8e550f2d2c720d8db584aea1b1b82
BLAKE2b-256 5964ea8cdba51e0b1812953919074c13038440101025c7058b96f2db7fa24001

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page