1

When running the code from comman line I have no problem:

$ python mycode.py > output.txt

But running that very code from within VI editor raises warning:

:! python mycod.py > output.txt
/opt6/tools/python2.6.2/lib/python2.6/site-packages/numpy/oldnumeric/__init__.py:11: ModuleDeprecationWarning: The oldnumeric module will be dropped in Numpy 1.9
  warnings.warn(_msg, ModuleDeprecationWarning)

Why is that and how to disable that from VI?

pdubois
  • 7,640
  • 21
  • 70
  • 99
  • `python -W ignore mycode.py > output.txt` but this is a duplicated question – AlvaroAV May 27 '14 at 11:59
  • possible duplicate of [How to disable python warnings](http://stackoverflow.com/questions/14463277/how-to-disable-python-warnings) – AlvaroAV May 27 '14 at 12:00
  • Strange. The warning should be produced even when running `python` on the console. Are you sure that you are running the same python version? If I'm not mistaken starting from python 2.7 deprecation warnings are ignored by default. – Bakuriu May 28 '14 at 09:32

1 Answers1

0

manage the numpy warnings with seterr :

http://docs.scipy.org/doc/numpy/reference/generated/numpy.seterr.html

Louis
  • 2,854
  • 2
  • 19
  • 24