From 248b12c23458387cd81d9c9296458e1ac820b1d1 Mon Sep 17 00:00:00 2001 From: Dave Pearson Date: Fri, 14 Oct 2022 18:55:13 +0100 Subject: [PATCH] Update docs/guide/devtools.md Co-authored-by: Will McGugan --- docs/guide/devtools.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/guide/devtools.md b/docs/guide/devtools.md index 2809446a7..887315ebc 100644 --- a/docs/guide/devtools.md +++ b/docs/guide/devtools.md @@ -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