When debugging, I often go into the IPython shell for interactive code testing. However, this also leads to a large python version informational dump, date and help instructions for stdout. How can I suppress this information so that it does not hide intentional debug messages?
x = get_important_data()
print 'important info! right here! The data is in variable "x"'
import IPython
IPython.embed()
This code gives the output as follows:
important info! right here! The data is in variable "x"
Python 2.7.11 |Anaconda 2.4.0 (x86_64)| (default, Dec 6 2015, 18:57:58)
Type "copyright", "credits" or "license" for more information.
IPython 4.0.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython features.
%quickref -> Quick reference.
help -> Python own help system.
object? -> Details about 'object', use 'object??' for extra details.
In [1]:
source
share