Development tools for Textual.
This package contains the textual
command line app, which will help to develop Textual applications.
See Getting Started for how to use it.
Development tools for Textual
Home Page: https://textual.textualize.io/getting_started/
License: MIT License
Development tools for Textual.
This package contains the textual
command line app, which will help to develop Textual applications.
See Getting Started for how to use it.
We need to had a --host
switch to the textual run
command which will connect to the given host. At the moment, this defaults to 127.0.0.1
, but the switch would allow the console to run on another machine.
Textual (in main) has a TEXTUAL_DEVTOOLS_HOST
env var which defaults to 127.0.0.1
, textual_dev
should populate this env var in the textual run
command.
I'm using an environment where I cannot really run multiple instances of the terminal, so using textual console to debug the textual apps is not feasible. I tried many tricks, but nothing works.
Is there a simpler way to debug textual apps?
I just need to save a detailed app.log file on disc and check it to find what went wrong. Since the issue is that we cannot write debug text on screen because it would broke the visual formatting, just redirecting all logging and errors output to a file log would be enough. Of course this log file would need to be ANSI formatted, and would require a textual powered reader to read it.
The local() method is great to print the local variables state at every log() or print() command, but its output should be integrated in a nicely ANSI formatted log file saved to disc. Or even better, textual-dev could include a reader app for ansi-encoded files, like the syntax aware codebrowser example app, so you can read a log with the full rich content generated by TextualHandler and RichHandler.
Is saving a rich log file possible? It would help to debug textual apps a lot for people like me. What do you think?
Hi,
Firstly I want to say that I've been greatly enjoying trying out textual!
I am attempting to package textual-dev
for Nix: see PR here. As part of the review process for packaging Nix it came up that tags are missing for textual-dev
. Is this something which would be possible to add? Happy to help out with this if I can :)
It's EOL; no reason to support a zombie.
Additionally, we could drop dependency on typing_extensions
as soon as we drop support for Python 3.7.
If you run textual --version
you get the version of Textual that's installed and used by textual-dev
. That's fine, almost all of the time.
But there are times where you want to know the version of textual-dev
too.
Modify --version
so that it reports both the version of textual
and textual-dev
.
It looks like rio doesn't currently advertise itself via TERM_PROGRAM
or via any other obvious environment variable. The result is it comes out as *Unknown*
.
It looks like XPC_SERVICE_NAME
is always set (on macOS anyway) to something that starts with application.com.raphaelamorim.rio
so this can work as a fallback detection method.
Hello everyone,
I have been recently using the textual-dev cli and I have been facing an extremely peculiar issue.
Whenever I try nesting CSS using the &
it fails horibbly.
Minimum Reproducible Example:
issue.py
from textual.app import App
from textual.widgets import Static
class BasicWidget(Static):
def compose(self):
yield Static("Inside", classes="inside")
class BasicApp(App):
CSS_PATH = "issue.tcss"
def compose(self):
yield BasicWidget()
if __name__ == '__main__':
app = BasicApp()
app.run()
issue.tcss
BasicWidget {
background: red;
width: 40;
& .inside {
background: green;
width: 10;
}
}
———————————————————————————————————————————————————————————
Commands Tested:
python issue.py
-> Works normally
textual run issue.py --dev
-> The following error in stylesheet:
• Expected one of 'comment line', 'comment start', 'declaration name', 'declaration set end', or 'whitespace'.
• Did you forget a semicolon at the end of a line?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.