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 sys
|
||||||
import os
|
|
||||||
|
|
||||||
# cd to the folder that contains this script
|
# combine the folder that contains this script
|
||||||
|
|
||||||
base = sys.path[0]
|
base = sys.path[0] or "."
|
||||||
os.chdir(base)
|
script = f"{base}/stand/webapp.py"
|
||||||
|
|
||||||
|
|
||||||
import subprocess
|
import subprocess
|
||||||
@ -52,7 +51,7 @@ import subprocess
|
|||||||
|
|
||||||
cmd = [
|
cmd = [
|
||||||
# "echo",
|
# "echo",
|
||||||
"streamlit", "run", *streamlit_params, "stand/webapp.py",
|
"streamlit", "run", *streamlit_params, script,
|
||||||
"--", *cherrypy_params
|
"--", *cherrypy_params
|
||||||
]
|
]
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user