[Biopython-dev] [Bug 2754] Bio.PDB: Parse warnings should print to stderr, not stdout
bugzilla-daemon at portal.open-bio.org
bugzilla-daemon at portal.open-bio.org
Thu Feb 12 13:08:01 EST 2009
http://bugzilla.open-bio.org/show_bug.cgi?id=2754
------- Comment #6 from eric.talevich at gmail.com 2009-02-12 13:08 EST -------
Created an attachment (id=1239)
--> (http://bugzilla.open-bio.org/attachment.cgi?id=1239&action=view)
Use the warnings module for printing warnings
I grepped Bio/PDB for stderr and replaced what looked like warning messages
with calls to warnings.warn(). A couple of files need further attention:
StructureBuilder.py:
Every warning is protected by "if __debug__:", which seems like something
the warning module itself should cover.
PDBParser.py:
Parsing exceptions are caught and passed to _handle_PDB_exception, which
then decides whether to re-raise the exception or just issue a warning. The
warnings module should be able to cover some of this functionality.
There's also a feature to only show the first instance of the same warnings
triggered by the same lines, which would make the output from parsing
semi-malformed PDB files less annoying in permissive mode.
--
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the Biopython-dev
mailing list