
    g                        d dl mZ d dlZd dlZd dlZd dlZ ej                         Zedk(  Zedk(  Z	edk(  xs dev Z
d
dZd
dZdd	Zy)    )annotationsNWindowsDarwinLinuxBSDc                 T    t        j                  dt        j                  d         ryy)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   TF)rematchsyspath     G/var/www/openai/venv/lib/python3.12/site-packages/streamlit/env_util.pyis_pexr      s      
xx	388A;'r   c                     ddl } | j                         d   }|d   }|j                  t        j                  j                  dd            ry|dv ryy	)
z*Return True if running in the Python REPL.r   N   binipythonT)z<stdin>z<string>F)inspectstackendswithosr   join)r   
root_framefilenames      r   is_replr   '   sO    $J!}HeY78 **r   c                "    ddl m}  ||       duS )z"Check if executable is in OS path.r   )whichN)shutilr   )namer   s     r   is_executable_in_pathr"   9   s    ;d""r   )returnbool)r!   strr#   r$   )
__future__r   r   platformr	   r   system_system
IS_WINDOWS	IS_DARWINIS_LINUX_OR_BSDr   r   r"   r   r   r   <module>r-      s[    # 	  	 

(//
	!
x	g%<5G+;$#r   