diff --git a/stand.py b/stand.py index d2c4aef..78e37b0 100755 --- a/stand.py +++ b/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 ]