Skip to content
This repository was archived by the owner on Sep 10, 2026. It is now read-only.

v3.2.0: Rainbows & usability!

Choose a tag to compare

@bczsalba bczsalba released this 04 Mar 13:49
· 638 commits to master since this release

Edit:

ptg -v does not work on PyPi installs in this version. This was already fixed in (e271857), but I didn't deem that one fix to be worthy of a full bugfix patch.


This version mostly focused on adding some nice utilities while improving the old ones. Before that however, I want take a second to mention how the library grew almost 300 stars in 2 days. I am immensely grateful for the exposure my project is getting, and I can't wait to see it in the wild!

Things to point out:

  • Improvements to pretty printing in general
  • pretty module: This is a very simple module that allows setting up displayhook with only one line in the REPL
  • KeyboardButton widget: This allows keyboard mnemonics inside PTG.
  • !rainbow and !gradient macros: These are very pretty and fancy looking.

Refactors

  • Colorize version info (b3075a3)
  • Stop displaying version hash info if it could not be found (695511610df6dce9c18bb7e105422d0dbd304b72)
  • Improve parser documentation (933729e)
  • Extend pretty printing to more data types (d0ae9cc)
  • Improve IPython display hook support (caa7c74)

Bugfixes

  • Fix redundant sequence output in MarkupLanguage.parse (7f49087)
  • Fix markup macros only running once due to caching (a2edf6d)
  • Fix Window.is_modal not being applied properly since a mouse handling refactor (c1d3619)

Additions

  • Add KeyboardButton widget (a1a0dad, c495dd0)
  • Add non_first_padding to Label (c630e6f)
  • Add ability to set box in Container constructor (88536be)
  • Add pretty module for quick displayhook setup (48fb0df)
  • Add !rainbow and !gradient macros (bc0e091)

Screenshot 2022-03-04 at 14 46 10 Screenshot 2022-03-04 at 14 45 06