def _os_path_isdir(pathname):
 try:
  s = _os_stat(pathname)
 except OSError:
  return None
 return ((s.st_mode & 61440) == 16384)

def _os_path_isdir ( pathname ) : try : s = _os_stat ( pathname ) except OSError : return None return ( ( s . st_mode & 61440 ) == 16384 )
local replacement for os .