1

Currently in IPython, when you call %pylab inline or %matplotlib inline the following message displays under the code block.

"Populating the interactive namespace from numpy and matplotlib"

How I can suppress this message from being displayed?

pyCthon
  • 11,746
  • 20
  • 73
  • 135

1 Answers1

2

I don't think there's a builtin way of suppressing that message since if you look at the %pylab magic function in this file you can see that the print statement is hard coded in there.

If this is a one-off kind of thing you can simply comment/remove that print line from your local library. (Typically it would be found at /usr/local/lib/python2.7/dist-packages/IPython/core/magics/pylab.py.) Or possibly redirect stdout to devnull or something like that.

toes
  • 603
  • 6
  • 13
  • Thanks for the suggestion, trying to automate things with ipython. I think I'll just file a bug and a pull request to add this feature. – pyCthon Apr 13 '15 at 19:39
  • The solution is to simple not use pylab, matplotlib actually doesn't produce the message. – pyCthon Apr 13 '15 at 20:31