### Navigation

- index
- modules |
- next |
- previous |
- IPython 0.10.2 documentation »
- The IPython API »

# kernel.core.fd_redirector

## Module: `kernel.core.fd_redirector`

Inheritance diagram for `IPython.kernel.core.fd_redirector`:

Stdout/stderr redirector, at the OS level, using file descriptors.

This also works under windows.

## `FDRedirector`

class `IPython.kernel.core.fd_redirector.``FDRedirector`(fd=1)

  Bases: `object`

  Class to redirect output (stdout or stderr) at the OS level using file descriptors.

  `__init__`()

    fd is the file descriptor of the outpout you want to capture. It can be STDOUT or STERR.

  `flush`()

    Flush the captured output, similar to the flush method of any stream.

  `getvalue`()

    Return the output captured since the last getvalue, or the start of the redirection.

  `start`()

    Setup the redirection.

  `stop`()

    Unset the redirection and return the captured output.

### Navigation

- index
- modules |
- next |
- previous |
- IPython 0.10.2 documentation »
- The IPython API »