old_contents: # -*- coding:utf-8 -*-
  
  from .run_cmd import RunCmd
  from .input_stream import InputStream
  
  
  def instream(s):
      return InputStream(s)
  
  
  def cmd(cmd_str):
      return RunCmd(cmd_str)
  
  
  def pipe_all(cmd_lst):
      # @TODO support first element as inputstream  03.04 2014 (houqp)
      ssr = RunCmd(cmd_lst.pop(0))
      for cmd in cmd_lst:
          ssr = ssr.p(cmd)
      return ssr
  
  
  def p(arg):
      if isinstance(arg, str):
          return cmd(arg)
      elif isinstance(arg, list):
          return pipe_all(arg)
  
  
  def ex(cmd_str):
      return RunCmd(cmd_str).run()
  
  
  def ex_all(cmd_lst):
      return [ex(c) for c in cmd_lst]
  
new_contents: # -*- coding:utf-8 -*-
  
  from .run_cmd import RunCmd
  from .input_stream import InputStream
  
  
  def instream(s):
      return InputStream(s)
  
  
  def cmd(cmd_str):
      return RunCmd(cmd_str)
  
  
  def pipe_all(cmd_lst):
      # @TODO support first element as inputstream  03.04 2014 (houqp)
      ssr = RunCmd(cmd_lst.pop(0))
      for cmd in cmd_lst:
          ssr = ssr.p(cmd)
      return ssr
  
  
  def p(arg):
      if isinstance(arg, str):
          return cmd(arg)
      elif isinstance(arg, list):
          return pipe_all(arg)
      else:
          raise ValueError('argument must be a string or list')
  
  
  def ex(cmd_str):
      return RunCmd(cmd_str).run()
  
  
  def ex_all(cmd_lst):
      return [ex(c) for c in cmd_lst]
  
subject: raise value error on invalid type for p()