Skip to main content

A simple tool for inspecting Textual widget styles

Project description

Textual DOMInfo

Introduction

This library provides a very simple debugging aid for Textual applications; designed as a very quick and easy "what widget is under the mouse and how is it styled" tool.

TO BE CLEAR: This isn't a full-blown DOM inspection tool; it's not even close. It's a quick and dirty but handy bit of code to quickly check what part of the terminal display belongs to what underlying widget and to see how it's styled.

Installing

The package can be installed with pip or related tools, for example:

$ pip install textual-dominfo

Using

As mentioned above, this is only ever intended to be used when trying to debug something, and also note that it will take over the tooltips of any widgets it is attached to.

To use, import the class:

from textual_dominfo import DOMInfo

and then in your code somewhere, probably in the on_mount method of your application or main screen, attach it like this:

DOMInfo.attach_to(self)

This will then install the information tooltip in that widget and all of its descendants.

To see this in action right away, with the library installed into your development environment, do this:

$ python -m textual_dominfo

The library in action

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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

textual_dominfo-0.1.0-py3-none-any.whl (4.3 kB view hashes)

Uploaded Python 3

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