how to use stdout and stderr via python

how to use stdout and stderr via python