tags:

views:

63

answers:

1

I am trying vim's python omni-completion script, it works, but I got problem.

After I start vim, the 1st time I press to ask vim to complete python code, many warning shown up. That's because some python libs in my project use md5, which will trigger a warning message in python 2.6

That's very ignoring, how to stop vim/python from issuing warning?

+1  A: 

If you have a top level routine which imports the 3rd party library, you can insert this

import warnings
warnings.simplefilter("ignore",DeprecationWarning)

to ignore all deprecation warnings (which is what the md5 warning is).

Check the warnings module for the details on more sophisticated filtering.

Noufal Ibrahim
Yes! It works! But I didn't add it to my code, instead I changed the vim script for python omni-completion.
ablmf
That's what I meant anyway. Glad that it works for you. :)
Noufal Ibrahim