Skip to main content
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

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

Release files for ipythonblocks 1.9.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ipythonblocks 1.9.1
File Size Uploaded
ipythonblocks-1.9.1.tar.gz 18.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ipythonblocks 1.9.1
File Interpreter ABI Platform
ipythonblocks-1.9.1-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 32.5 kB

Release files / ipythonblocks-1.9.1.tar.gz

Download URL ipythonblocks-1.9.1.tar.gz
Size 18.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f1b2fbab0e96881a38e2b77b06619df783e5b5793353aaeefd705f2230c07d81
BLAKE2b-256 checksum
How to use checksums
6518f02f0bf6000de495d70a5ff9165b90476c57384f27915244265126322c3e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Release files / ipythonblocks-1.9.1-py2.py3-none-any.whl

Download URL ipythonblocks-1.9.1-py2.py3-none-any.whl
Size 14.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
57af45dd6325a94c2762f9f3e7cac12a6457d3c60f6574fab7544991f1803e6c
BLAKE2b-256 checksum
How to use checksums
6fb96147d443973c996f44ebac5a526e81ea38fc762696bbb2966aef6ec0007c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Release history Release notifications | RSS feed

This release

1.9.1 This release

2 release files

1.9.0

2 release files

1.8.0

2 release files

1.7.1

2 release files

1.7.0

3 release files

1.6.1

2 release files

1.6.0

2 release files

1.5

2 release files

1.4

2 release files

1.3

2 release files

1.2

2 release files

1.1.1

2 release files

1.1

2 release files

1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page