def get_file_mode(path):
 return stat.S_IMODE(os.stat(path).st_mode)

def get_file_mode ( path ) : return stat . S_IMODE ( os . stat ( path ) . st_mode )
this primarily exists to make unit testing easier .