Jon Poler added the comment:

Here's one way to accomplish this. Please see attached 
os_exceptions_table_V2.patch.

I wasn't having much luck trying to use ReST, so I took advantage of the fact 
that the Doc/conf.py file is executed every time sphinx-build is run. conf.py 
imports and calls the main function from Doc/tools/build_table.py. This script 
dynamically builds a table by scraping errno values corresponding to an OS 
exception and inserting them in the appropriate place. 
Doc/library/exceptions.rst just uses a literalinclude of the new table that 
gets built to Lib/test/os_exception_hierarchy.txt (the same directory that 
holds the original exceptions hierarchy).

Error catching is used so that, in the event of an error, a warning will be 
raised but the sphinx-build command will still succeed.

----------
Added file: http://bugs.python.org/file36392/os_exceptions_table_V2.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22014>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to