mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
words
This commit is contained in:
@@ -1,7 +1,13 @@
|
||||
# Textual Devtools
|
||||
# Devtools
|
||||
|
||||
Textual comes with a command line application of the same name. The `textual` command is a super useful tool that will help you to build apps.
|
||||
|
||||
Take a moment to look through the available sub-commands. There will be even more helpful tools here in the future.
|
||||
|
||||
```bash
|
||||
textual --help
|
||||
```
|
||||
|
||||
## Run
|
||||
|
||||
You can run Textual apps with the `run` subcommand. If you supply a path to a Python file it will load and run the application.
|
||||
@@ -16,6 +22,10 @@ The `run` sub-command assumes you have a Application instance called `app` in th
|
||||
textual run my_app.py:alternative_app
|
||||
```
|
||||
|
||||
!!! note
|
||||
|
||||
If the Python file contains a call to app.run() then you can launch the file as you normally would any other Python program. Running your app via `textual run` will give you access to a few Textual features such as dev mode which auto (re) loads your CSS if you change it.
|
||||
|
||||
## Console
|
||||
|
||||
When running any terminal application, you can no longer use `print` when debugging (or log to the console). This is because anything you write to standard output would typically overwrite application content, which generally makes an unreadable mess. Fortunately Textual supplies a debug console of it's own which has some super helpful features.
|
||||
|
||||
Reference in New Issue
Block a user