cmd_process.py
Go to the documentation of this file.
00001 import subprocess as sb
00002 import os
00003 
00004 class CmdProcess:
00005     
00006     def __init__(self, cmd_list):
00007         self.cmd_list= cmd_list
00008         self.process = None
00009 
00010     def run(self):
00011         self.process = sb.Popen(self.cmd_list)
00012 
00013     def kill(self):
00014         os.system('kill -2 %d' % self.process.pid)
00015 
00016     def is_finished( self ):
00017         return self.process.poll() != None
00018 


hrl_lib
Author(s): Cressel Anderson, Travis Deyle, Advait Jain, Hai Nguyen, Advisor: Prof. Charlie Kemp, Lab: Healthcare Robotics Lab at Georgia Tech
autogenerated on Wed Nov 27 2013 11:34:06