A zero-config terminal-based grid algorithms visualizer.
Project description
mm mm
## ##
##m###m m####m ##m###m m####m
##" "## ##" "## ##" "## ##" "##
## ## ## ## ## ## ## ##
###mm##" "##mm##" ###mm##" "##mm##"
"" """ """" "" """ """"
A zero-config terminal visualizer for grid-based algorithms, written in Python.
Quick Start
Install
pip install
Use
bobo your_algorithm.py
Example
bobo bfs.py
bobo knights_tour.py
bobo maze_generation.py --speed turbo
How It Works
This "algorithm visualizer" which is built on Python (I know, gets pretty slow on maybe larger stuff), relies heavily on Python's sys.settrace. Basically what this does it on every line of code, it inspects local variables for 2D lists (grids/matrices) and bobo does the following:
- Detects the grid automatically (no annotations needed)
- Diffs the new state against the previous snapshot
- Highlights which cells just changed (reverse video)
- Renders the frame with auto-assigned colors
Without touching the source code itself.
CLI Options
bobo <script> [options]
| Option | Default | Description |
|---|---|---|
<script> |
(required) | Path to the Python script to visualize |
--delay <seconds> |
0.5 |
Seconds to pause between frames |
--speed <preset> |
normal |
slow (1s) · normal (0.5s) · fast (0.1s) · turbo (0.01s) |
--var <variable> |
(auto-detect) | Only track a specific variable |
--no-clear |
Don't clear terminal between frames (scrollback mode) |
Examples
# Watch BFS pathfinding at default speed
bobo bfs.py
# Speed up maze generation
bobo bfs.py --speed turbo
# Only track the 'empty_grid' table
bobo 8queens.py --var empty_grid
# Keep all frames in scrollback for review
bobo bfs.py --no-clear --speed fast
Supported Algorithms
bobo works with any algorithm that operates on 2D Python lists (spatial), anything that involves rows and columns.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bobo_vis-1.0.2.tar.gz.
File metadata
- Download URL: bobo_vis-1.0.2.tar.gz
- Upload date:
- Size: 12.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0db642d1c2dab076c3ab084e476c9e312126d3aa56de1e0477459363ad94a4e
|
|
| MD5 |
a38adefd38690827fb4c8ae5745610af
|
|
| BLAKE2b-256 |
a31d4a48a090c27f8876f3424e0217ad19c249f0456fbf4925e927620e6b8599
|
File details
Details for the file bobo_vis-1.0.2-py3-none-any.whl.
File metadata
- Download URL: bobo_vis-1.0.2-py3-none-any.whl
- Upload date:
- Size: 13.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f244e49200e4aefd5e84325d9deeb5a6b893f3bf9a4a3161880ba4263742d12
|
|
| MD5 |
5c9de27fef7f9ee1af71483aa4f7b46d
|
|
| BLAKE2b-256 |
ac4903e2420ca06420ae0cbaa2d17049f83444fd4876c4eb696f505292944128
|