
from subprocess import Popen, PIPE


def launch(cmd):
    """
    Fork the specified command, returning a tuple of (stdout, stderr)
    """
    return Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE).communicate()


def get_stdout(cmd):
    """
    Fork the specified command, returning stdout
    """
    return launch(cmd)[0]


from subprocess import Popen, PIPE


def launch(cmd):
    """
    Fork the specified command, returning a tuple of (stdout, stderr)
    """
    return Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE).communicate()


def get_stdout(cmd):
    """
    Fork the specified command, returning stdout
    """
    return launch(cmd)[0]


def get_stderr(cmd):
    """
    Fork the specified command, returning stderr
    """
    return launch(cmd)[1]

Add function to get just stderr from subprocess command
Add function to get just stderr from subprocess command

  
  from subprocess import Popen, PIPE
  
  
  def launch(cmd):
      """
      Fork the specified command, returning a tuple of (stdout, stderr)
      """
      return Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE).communicate()
  
  
  def get_stdout(cmd):
      """
      Fork the specified command, returning stdout
      """
      return launch(cmd)[0]
  
+ 
+ def get_stderr(cmd):
+     """
+     Fork the specified command, returning stderr
+     """
+     return launch(cmd)[1]
+ 
Add function to get just stderr from subprocess command
## Code Before:

from subprocess import Popen, PIPE


def launch(cmd):
    """
    Fork the specified command, returning a tuple of (stdout, stderr)
    """
    return Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE).communicate()


def get_stdout(cmd):
    """
    Fork the specified command, returning stdout
    """
    return launch(cmd)[0]

## Instruction:
Add function to get just stderr from subprocess command
## Code After:

from subprocess import Popen, PIPE


def launch(cmd):
    """
    Fork the specified command, returning a tuple of (stdout, stderr)
    """
    return Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE).communicate()


def get_stdout(cmd):
    """
    Fork the specified command, returning stdout
    """
    return launch(cmd)[0]


def get_stderr(cmd):
    """
    Fork the specified command, returning stderr
    """
    return launch(cmd)[1]
