parameters: ()
docstring: Set up 'os' module replacement functions for use during import bootstrap.
docstring_summary: Set up 'os' module replacement functions for use during import bootstrap.
docstring_tokens: Set up os module replacement functions for use during import bootstrap .
function: def _os_bootstrap():
      "Set up 'os' module replacement functions for use during import 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
      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
function_tokens: 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 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