You may have more luck asking on a python or ipython specific forum, as the syntax to do so generally wouldn’t be PyRosetta specific.
One complication you may have is that the C++ layer of PyRosetta goes through a different output path than the Python-level output does. By default, PyRosetta is set up to direct the output through the logging module of Python (https://docs.python.org/2/library/logging.html), if applicable, rather than just sys.stdout. See https://docs.python.org/2/howto/logging.html and https://docs.python.org/2/howto/logging-cookbook.html for details on how to use the logging module. You need to set up the logger to redirect the output to the appropriate locations prior to calling rosetta.init()