ó
¤ Qc           @   s
  d  Z  d d l Z e j Z d Z d e k r\ d d l m Z d d l m Z	 d Z
 d Z nG d	 e k r d d l m Z d d l m Z	 d
 Z
 d Z n e d   e
 d  Z e
 e d  Z e j j d  rÜ d   Z n	 d   Z d e k rý d   Z n	 d   Z d S(   sY   
Set up 'os' and 'os.path' module replacement functions for use during import
bootstrap.
i˙˙˙˙Ni    t   posix(   t   environ(   t   listdirt   /i   t   nts   \i   s   No os specific module foundc         C   sF   |  d k r | S|  d } | d k s2 | | k r: |  | S|  | | S(   Nt    i˙˙˙˙R   (    (   t   at   bt   sept   lastchar(    (    sa   C:\Users\Salopaasi\My Documents\pyinstaller-pyinstaller-275d4c9\PyInstaller\loader\pyi_os_path.pyt   os_path_join4   s    
c         C   sm   xf t  t |   d d d  D]H } |  | } | d k sE | | k r | | k  r] |  | d  S|  |  Sq Wd S(   Ni   i˙˙˙˙R   R   (   t   ranget   len(   R   R   t	   mindirlent   it   c(    (    sa   C:\Users\Salopaasi\My Documents\pyinstaller-pyinstaller-275d4c9\PyInstaller\loader\pyi_os_path.pyt   os_path_dirname>   s    #
t   winc         C   s   |  d d !d k r- |  d d !} |  d } n d } |  } t  |  } x( | ro | | d d k ro | d } qH W| |  | | } } | S(   Ni   i   t   :i    R   s   /\(   R   (   t   ptht   dt   pR   t   headt   tail(    (    sa   C:\Users\Salopaasi\My Documents\pyinstaller-pyinstaller-275d4c9\PyInstaller\loader\pyi_os_path.pyt   os_path_basenameL   s    c         C   s   |  j  d  d } |  | S(   NR   i   (   t   rfind(   R   R   (    (    sa   C:\Users\Salopaasi\My Documents\pyinstaller-pyinstaller-275d4c9\PyInstaller\loader\pyi_os_path.pyR   `   s    t   PYTHONCASEOKc         C   s"   t  t |    } t |   | k S(   N(   t
   os_listdirR   R   (   t   filenamet   files(    (    sa   C:\Users\Salopaasi\My Documents\pyinstaller-pyinstaller-275d4c9\PyInstaller\loader\pyi_os_path.pyt   caseOkf   s    c         C   s   t  S(   N(   t   True(   R   (    (    sa   C:\Users\Salopaasi\My Documents\pyinstaller-pyinstaller-275d4c9\PyInstaller\loader\pyi_os_path.pyR   j   s    (   t   __doc__t   syst   builtin_module_namest   _builtin_namest
   _mindirlenR    R   t
   os_environR   R   t   os_sepR   t   ImportErrorR
   R   t   platformt
   startswithR   R   (    (    (    sa   C:\Users\Salopaasi\My Documents\pyinstaller-pyinstaller-275d4c9\PyInstaller\loader\pyi_os_path.pyt   <module>   s,   			
	