Skip to content

Commit 0a7294a

Browse files
committed
simplify serve
1 parent bb4f879 commit 0a7294a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
__pycache__/
33
*.py[cod]
44
*$py.class
5-
5+
.vscode/
66
# C extensions
77
*.so
88

src/textual_dev/cli.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,9 @@ def serve(
257257
"""
258258
from textual_serve.server import Server
259259

260+
if " " not in command and command.endswith(".py"):
261+
command = f"python {command}"
262+
260263
server = Server(command, host, port, title=title, public_url=url)
261264
server.serve(debug=dev)
262265

0 commit comments

Comments
 (0)