def p4_build_cmd(cmd):
 real_cmd = ['p4']
 if isinstance(cmd, six.string_types):
  real_cmd = ((' '.join(real_cmd) + ' ') + cmd)
 else:
  real_cmd += cmd
 return real_cmd

def p4_build_cmd ( cmd ) : real_cmd = [ 'p4' ] if isinstance ( cmd , six . string_types ) : real_cmd = ( ( ' ' . join ( real_cmd ) + ' ' ) + cmd ) else : real_cmd += cmd return real_cmd
build a suitable p4 command line .