Thanks. Package level state in Python is unusual - I was trying to work
out how I'd get a hook to the warnings instance. But it turns out it's
all static (duh):
import warnings
warnings.filterwarnings('ignore', category=tables.NaturalNameWarning)
On Fri, 11 Jul 2008 09:10:11 +0200, "Francesc Alted"
<[EMAIL PROTECTED]> said:
> A Friday 11 July 2008, Nick Bower escrigué:
> > Hello. How do I stop these warnings?
> >
> > /usr/lib/python2.5/site-packages/tables/path.py:102:
> > NaturalNameWarning: object name is not a valid Python identifier:
> > 'Wheel Slip'; it does not match the pattern
> > ``^[a-zA-Z_][a-zA-Z0-9_]*$``; you will not be able to use natural
> > naming to access this object; using ``getattr()`` will still work,
> > though
> > NaturalNameWarning )
> >
> > These messages fill the output when running my unit tests because I
> > use column names that are not valid python variables (which I think
> > is reasonable).
>
> You can avoid the warnings using the machinery that provides Python
> through its 'warnings' module -- see the tests units that comes with
> PyTables for examples on disabling the warnings. Also, you may want to
> use the -W flag of the Python interpreter.
>
> HTH,
>
> --
> Francesc Alted
> Freelance developer
> Tel +34-964-282-249
>
> -------------------------------------------------------------------------
> Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
> Studies have shown that voting for your favorite open source project,
> along with a healthy diet, reduces your potential for chronic lameness
> and boredom. Vote Now at http://www.sourceforge.net/community/cca08
> _______________________________________________
> Pytables-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/pytables-users
--
Nick Bower
[EMAIL PROTECTED]
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Pytables-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pytables-users