mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Update docs/guide/devtools.md
Co-authored-by: Will McGugan <willmcgugan@gmail.com>
This commit is contained in:
@@ -23,7 +23,9 @@ You can run Textual apps with the `run` subcommand. If you supply a path to a Py
|
||||
textual run my_app.py
|
||||
```
|
||||
|
||||
The `run` sub-command will look to see if you have an `App` instance called `app` in the global scope of your Python file and will use that if it does. If not it will then look to see if there is a class that inherits from `App` and it will create and `run` an instance of that. Finally, you can specify the application instance to run with a colon following the filename:
|
||||
The `run` sub-command will first look for a `App` instance called `app` in the global scope of your Python file. If there is no `app`, it will create an instance of the first `App` class it finds and run that.
|
||||
|
||||
Alternatively, you can add the name of an `App` instance or class after a colon to run a specific app in the Python file. Here's an example:
|
||||
|
||||
```bash
|
||||
textual run my_app.py:alternative_app
|
||||
|
||||
Reference in New Issue
Block a user