def copymode(src, dst):
 if hasattr(os, 'chmod'):
  st = os.stat(src)
  mode = stat.S_IMODE(st.st_mode)
  os.chmod(dst, mode)

def copymode ( src , dst ) : if hasattr ( os , 'chmod' ) : st = os . stat ( src ) mode = stat . S_IMODE ( st . st_mode ) os . chmod ( dst , mode )
copy mode bits from src to dst .