def cmd(self, args, wait = True):
        ''' run a command on the physical node
        '''
        os.chdir(self.nodedir)
        try:
            if wait:
                # os.spawnlp(os.P_WAIT, args)
                subprocess.call(args)
            else:
                # os.spawnlp(os.P_NOWAIT, args)
                subprocess.Popen(args)
        except CalledProcessError, e:
            self.warn("cmd exited with status %s: %s" % (e, str(args)))
dataset/ETHPy150Open coreemu/core/daemon/core/phys/pnodes.py/PhysicalNode.cmd/original