Complexitty
Posted on 2025-04-20 09:30 +0100 in Coding • Tagged with Python, terminal, textual, mandelbrot • 2 min read
Much like Norton Guide readers or the 5x5 puzzle, code that has fun with the Mandelbrot set is another one of my goto exercises. I've written versions in many languages, and messed with plots in some different environments, as varied as in VR on the web to wearable items.
Back in the early days of my involvement with Textualize I wrote a deliberately worst-approach version using that framework. The whole thing was about taking a really silly approach while also stress-testing Textual itself. It did the job.
Later on I did a second version that targets
Textual. This time it did a
better job and was the catalyst for building
textual-canvas
. This version was
intended more to be a widget that happened to come with an example
application, and while it was far more better than the on-purpose-terrible
version mentioned above, I still wasn't 100% happy with the way it worked.
Recently I did some maintenance work on textual-canvas
, cleaning up the
repository and bringing it in line with how I like to maintain my Python
projects these days, and this prompted me to look back at
textual-mandelbrot
and rework it too. Quickly I realised it wasn't really
sensible to rewrite it in a way that it would be backward compatible (not
that I think anyone has ever used the widget) and instead I decided to kick
off a fresh stand-alone application.
Complexitty is the result.
Right now the application has all the same features as the mandelexp
application that came with textual-mandelbrot
, plus a couple more. Also
it's built on top of the common core
library I've been putting
together for all my own terminal-based Python applications. As time goes on
I'll add more
features.
As with most of my recent TUI-based projects, the application is built with comprehensive help for commands and key bindings.
and there's also a command palette that helps you discover (and run) commands and their keyboard bindings.
Complexitty is licensed GPL-3.0 and available via
GitHub and also via
PyPI. If you have an environment that has
pipx
installed you should be able to get up and going with:
pipx install complexitty
It can also be installed with
Homebrew
by tapping davep/homebrew
and then installing complexitty
:
brew tap davep/homebrew
brew install complexitty