I need to produce a screencast of an ipython session, and to avoid confusing viewers, I want to disable all warnings emitted by warnings.warn
calls from different packages. Is there a way to configure the ipythonrc file to automatically disable all such warnings?
Python – Hide all warnings in ipython
ipythonpythonwarnings
Related Topic
- Python – open() in Python does not create a file if it doesn’t exist
- Python – How to list all files of a directory
- Python – Reloading submodules in IPython
- Python – Making Python loggers output all messages to stdout in addition to log file
- Python – Step-by-step debugging with IPython
- Using IPython notebooks under version control
- Python – How to make IPython notebook matplotlib plot inline
Best Answer
I eventually figured it out. Place:
inside
~/.ipython/profile_default/startup/disable-warnings.py
. I'm leaving this question and answer for the record in case anyone else comes across the same issue.Quite often it is useful to see a warning once. This can be set by: