#!/usr/bin/env python

import sys
import shlex, subprocess

def main():
  cmd_line = sys.argv[1]
  cmd_line = "./hello.sh"
  print cmd_line
  args = shlex.split(cmd_line)
  print args
  p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  out, err = p.communicate()
  print "======" 
  print out
  print "======" 
  print err

if __name__ == "__main__":
    main()

