def p4_has_move_command():
 if (not p4_has_command('move')):
  return False
 cmd = p4_build_cmd(['move', '-k', '@from', '@to'])
 p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
 (out, err) = p.communicate()
 if (err.find('Invalid option') >= 0):
  return False
 if (err.find('disabled') >= 0):
  return False
 return True

def p4_has_move_command ( ) : if ( not p4_has_command ( 'move' ) ) : return False cmd = p4_build_cmd ( [ 'move' , '-k' , '@from' , '@to' ] ) p = subprocess . Popen ( cmd , stdout = subprocess . PIPE , stderr = subprocess . PIPE ) ( out , err ) = p . communicate ( ) if ( err . find ( 'Invalid option' ) >= 0 ) : return False if ( err . find ( 'disabled' ) >= 0 ) : return False return True
see if the move command exists .