We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2e98c21 + c391681 commit aac9d87Copy full SHA for aac9d87
src/textual/_import_app.py
@@ -1,6 +1,7 @@
1
from __future__ import annotations
2
3
import os
4
+import sys
5
import runpy
6
import shlex
7
from pathlib import Path
@@ -30,7 +31,6 @@ def import_app(import_name: str) -> App:
30
31
32
import inspect
33
import importlib
- import sys
34
35
from textual.app import App, WINDOWS
36
@@ -45,8 +45,7 @@ def import_app(import_name: str) -> App:
45
except Exception as error:
46
raise AppFail(str(error))
47
48
- if "sys" in global_vars:
49
- global_vars["sys"].argv = [path, *argv]
+ sys.argv[:] = [path, *argv]
50
51
if name:
52
# User has given a name, use that
0 commit comments