L iddlmZddlZddlZddlZddlZej jZedk(Z edk(Z edk(xsdevZ d dZ d dZ d d Zy) ) annotationsNwindowsdarwinlinuxbsdcbttjdtjdS)zReturn if streamlit running in pex. Pex modifies sys.path so the pex file is the first path and that's how we determine we're running in the pex file. z.*pex$r)boolrematchsyspathX/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/streamlit/env_util.pyis_pexrs" CHHQK0 11rcddl}|jd}|d}|jtjj ddry|dvS) z*Return True if running in the Python REPL.rNbinipythonT)zz)inspectstackendswithosr join)r root_framefilenames ris_replr%sL$J!}HeY78 . ..rc"ddlm}||duS)z"Check if executable is in OS path.r)whichN)shutilr )namer s ris_executable_in_pathr#4s ;d ""r)returnr )r"strr$r ) __future__rrplatformr r systemlowerSYSTEM IS_WINDOWS IS_DARWINIS_LINUX_OR_BSDrrr#rrrr.sc#    " y h  W$:%6/2 /#r