def execute_command_in_shell(self, command,args=[]):
        
        """ Execute a shell command

        Parameters:

        command - The command to execute
        args    - Command arguments, as a list
        """

        execfn = ' '.join([command] + list(args))
            
        try:
            p = Popen(execfn, env=os.environ, shell=True)
            p.wait()
            return p.returncode
        
        except Exception,e:
            print e
        
        return -1
 Execute a shell command

        Parameters:

        command - The command to execute
        args    - Command arguments, as a list
        
recipes/Python/498137_Minicommands_using_subprocess/recipe-498137.py