def isBeingWritten(filepath):
 ctime = max(ek(os.path.getctime, filepath), ek(os.path.getmtime, filepath))
 if (ctime > (time.time() - 60)):
  return True
 return False

def isBeingWritten ( filepath ) : ctime = max ( ek ( os . path . getctime , filepath ) , ek ( os . path . getmtime , filepath ) ) if ( ctime > ( time . time ( ) - 60 ) ) : return True return False
check if file has been written in last 60 seconds .