dont chdir, but construct the path
This commit is contained in:
9
stand.py
9
stand.py
@ -36,12 +36,11 @@ cherrypy_params = f"""
|
||||
|
||||
|
||||
import sys
|
||||
import os
|
||||
|
||||
# cd to the folder that contains this script
|
||||
# combine the folder that contains this script
|
||||
|
||||
base = sys.path[0]
|
||||
os.chdir(base)
|
||||
base = sys.path[0] or "."
|
||||
script = f"{base}/stand/webapp.py"
|
||||
|
||||
|
||||
import subprocess
|
||||
@ -52,7 +51,7 @@ import subprocess
|
||||
|
||||
cmd = [
|
||||
# "echo",
|
||||
"streamlit", "run", *streamlit_params, "stand/webapp.py",
|
||||
"streamlit", "run", *streamlit_params, script,
|
||||
"--", *cherrypy_params
|
||||
]
|
||||
|
||||
|
Reference in New Issue
Block a user