def _os_bootstrap():
 names = sys.builtin_module_names
 join = None
 if ('posix' in names):
  sep = '/'
  from posix import stat
 elif ('nt' in names):
  sep = '\\'
  from nt import stat
 elif ('dos' in names):
  sep = '\\'
  from dos import stat
 elif ('os2' in names):
  sep = '\\'
  from os2 import stat
 elif ('mac' in names):
  from mac import stat
  def join(a, b):
   if (a == ''):
    return b
   if (':' not in a):
    a = (':' + a)
   if (a[(-1):] != ':'):
    a = (a + ':')
   return (a + b)
 else:
  raise ImportError, 'no os specific module found'
 if (join is None):
  def join(a, b, sep=sep):
   if (a == ''):
    return b
   lastchar = a[(-1):]
   if ((lastchar == '/') or (lastchar == sep)):
    return (a + b)
   return ((a + sep) + b)
 global _os_stat
 _os_stat = stat
 global _os_path_join
 _os_path_join = join

def _os_bootstrap ( ) : names = sys . builtin_module_names join = None if ( 'posix' in names ) : sep = '/' from posix import stat elif ( 'nt' in names ) : sep = '\\' from nt import stat elif ( 'dos' in names ) : sep = '\\' from dos import stat elif ( 'os2' in names ) : sep = '\\' from os2 import stat elif ( 'mac' in names ) : from mac import stat def join ( a , b ) : if ( a == '' ) : return b if ( ':' not in a ) : a = ( ':' + a ) if ( a [ ( - 1 ) : ] != ':' ) : a = ( a + ':' ) return ( a + b ) else : raise ImportError , 'no os specific module found' if ( join is None ) : def join ( a , b , sep = sep ) : if ( a == '' ) : return b lastchar = a [ ( - 1 ) : ] if ( ( lastchar == '/' ) or ( lastchar == sep ) ) : return ( a + b ) return ( ( a + sep ) + b ) global _os_stat _os_stat = stat global _os_path_join _os_path_join = join
set up os module replacement functions for use during import bootstrap .