diff options
Diffstat (limited to 'gr-utils/python/modtool/gr-newmod/docs')
10 files changed, 66 insertions, 47 deletions
diff --git a/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/__init__.py b/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/__init__.py index 5cd0b3c6c5..b7a8884519 100644 --- a/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/__init__.py +++ b/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/__init__.py @@ -63,8 +63,9 @@ This line is uninformative and is only to test line breaks in the comments. u'Outputs the vital aadvark statistics.' """ +from __future__ import unicode_literals -from doxyindex import DoxyIndex, DoxyFunction, DoxyParam, DoxyClass, DoxyFile, DoxyNamespace, DoxyGroup, DoxyFriend, DoxyOther +from .doxyindex import DoxyIndex, DoxyFunction, DoxyParam, DoxyClass, DoxyFile, DoxyNamespace, DoxyGroup, DoxyFriend, DoxyOther def _test(): import os diff --git a/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/base.py b/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/base.py index e8f026ab90..0f0adf255b 100644 --- a/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/base.py +++ b/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/base.py @@ -24,24 +24,26 @@ A base class is created. Classes based upon this are used to make more user-friendly interfaces to the doxygen xml docs than the generated classes provide. """ +from __future__ import print_function +from __future__ import unicode_literals import os import pdb from xml.parsers.expat import ExpatError -from generated import compound +from .generated import compound class Base(object): - class Duplicate(StandardError): + class Duplicate(Exception): pass - class NoSuchMember(StandardError): + class NoSuchMember(Exception): pass - class ParsingError(StandardError): + class ParsingError(Exception): pass def __init__(self, parse_data, top=None): @@ -94,7 +96,7 @@ class Base(object): for cls in self.mem_classes: if cls.can_parse(mem): return cls - raise StandardError(("Did not find a class for object '%s'." \ + raise Exception(("Did not find a class for object '%s'." \ % (mem.get_name()))) def convert_mem(self, mem): @@ -102,11 +104,11 @@ class Base(object): cls = self.get_cls(mem) converted = cls.from_parse_data(mem, self.top) if converted is None: - raise StandardError('No class matched this object.') + raise Exception('No class matched this object.') self.add_ref(converted) return converted - except StandardError, e: - print e + except Exception as e: + print(e) @classmethod def includes(cls, inst): diff --git a/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/doxyindex.py b/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/doxyindex.py index 78e8153768..4284af25ec 100644 --- a/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/doxyindex.py +++ b/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/doxyindex.py @@ -22,12 +22,14 @@ Classes providing more user-friendly interfaces to the doxygen xml docs than the generated classes provide. """ +from __future__ import absolute_import +from __future__ import unicode_literals import os -from generated import index -from base import Base -from text import description +from .generated import index +from .base import Base +from .text import description class DoxyIndex(Base): """ diff --git a/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/generated/__init__.py b/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/generated/__init__.py index 39823979f6..23095c1f34 100644 --- a/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/generated/__init__.py +++ b/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/generated/__init__.py @@ -5,3 +5,4 @@ These do the real work of parsing the doxygen xml files but the resultant classes are not very friendly to navigate so the rest of the doxyxml module processes them further. """ +from __future__ import unicode_literals diff --git a/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/generated/compound.py b/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/generated/compound.py index 1522ac23f1..acfa0dd5c6 100644 --- a/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/generated/compound.py +++ b/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/generated/compound.py @@ -3,15 +3,17 @@ """ Generated Mon Feb 9 19:08:05 2009 by generateDS.py. """ +from __future__ import absolute_import +from __future__ import unicode_literals + -from string import lower as str_lower from xml.dom import minidom from xml.dom import Node import sys -import compoundsuper as supermod -from compoundsuper import MixedContainer +from . import compoundsuper as supermod +from .compoundsuper import MixedContainer class DoxygenTypeSub(supermod.DoxygenType): diff --git a/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/generated/compoundsuper.py b/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/generated/compoundsuper.py index 6255dda163..6e984e13ec 100644 --- a/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/generated/compoundsuper.py +++ b/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/generated/compoundsuper.py @@ -4,12 +4,17 @@ # Generated Thu Jun 11 18:44:25 2009 by generateDS.py. # +from __future__ import print_function +from __future__ import unicode_literals + import sys -import getopt -from string import lower as str_lower + from xml.dom import minidom from xml.dom import Node +import six + + # # User methods # @@ -19,9 +24,9 @@ from xml.dom import Node try: from generatedssuper import GeneratedsSuper -except ImportError, exp: +except ImportError as exp: - class GeneratedsSuper: + class GeneratedsSuper(object): def format_string(self, input_data, input_name=''): return input_data def format_integer(self, input_data, input_name=''): @@ -64,7 +69,7 @@ def showIndent(outfile, level): outfile.write(' ') def quote_xml(inStr): - s1 = (isinstance(inStr, basestring) and inStr or + s1 = (isinstance(inStr, six.string_types) and inStr or '%s' % inStr) s1 = s1.replace('&', '&') s1 = s1.replace('<', '<') @@ -72,7 +77,7 @@ def quote_xml(inStr): return s1 def quote_attrib(inStr): - s1 = (isinstance(inStr, basestring) and inStr or + s1 = (isinstance(inStr, six.string_types) and inStr or '%s' % inStr) s1 = s1.replace('&', '&') s1 = s1.replace('<', '<') @@ -102,7 +107,7 @@ def quote_python(inStr): return '"""%s"""' % s1 -class MixedContainer: +class MixedContainer(object): # Constants for category: CategoryNone = 0 CategoryText = 1 @@ -4221,7 +4226,7 @@ class codelineType(GeneratedsSuper): if attrs.get('lineno'): try: self.lineno = int(attrs.get('lineno').value) - except ValueError, exp: + except ValueError as exp: raise ValueError('Bad integer attribute (lineno): %s' % exp) if attrs.get('refkind'): self.refkind = attrs.get('refkind').value @@ -4504,12 +4509,12 @@ class referenceType(GeneratedsSuper): if attrs.get('endline'): try: self.endline = int(attrs.get('endline').value) - except ValueError, exp: + except ValueError as exp: raise ValueError('Bad integer attribute (endline): %s' % exp) if attrs.get('startline'): try: self.startline = int(attrs.get('startline').value) - except ValueError, exp: + except ValueError as exp: raise ValueError('Bad integer attribute (startline): %s' % exp) if attrs.get('refid'): self.refid = attrs.get('refid').value @@ -4627,17 +4632,17 @@ class locationType(GeneratedsSuper): if attrs.get('bodystart'): try: self.bodystart = int(attrs.get('bodystart').value) - except ValueError, exp: + except ValueError as exp: raise ValueError('Bad integer attribute (bodystart): %s' % exp) if attrs.get('line'): try: self.line = int(attrs.get('line').value) - except ValueError, exp: + except ValueError as exp: raise ValueError('Bad integer attribute (line): %s' % exp) if attrs.get('bodyend'): try: self.bodyend = int(attrs.get('bodyend').value) - except ValueError, exp: + except ValueError as exp: raise ValueError('Bad integer attribute (bodyend): %s' % exp) if attrs.get('bodyfile'): self.bodyfile = attrs.get('bodyfile').value @@ -6778,12 +6783,12 @@ class docTableType(GeneratedsSuper): if attrs.get('rows'): try: self.rows = int(attrs.get('rows').value) - except ValueError, exp: + except ValueError as exp: raise ValueError('Bad integer attribute (rows): %s' % exp) if attrs.get('cols'): try: self.cols = int(attrs.get('cols').value) - except ValueError, exp: + except ValueError as exp: raise ValueError('Bad integer attribute (cols): %s' % exp) def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.ELEMENT_NODE and \ @@ -7108,7 +7113,7 @@ class docHeadingType(GeneratedsSuper): if attrs.get('level'): try: self.level = int(attrs.get('level').value) - except ValueError, exp: + except ValueError as exp: raise ValueError('Bad integer attribute (level): %s' % exp) def buildChildren(self, child_, nodeName_): if child_.nodeType == Node.TEXT_NODE: @@ -8283,7 +8288,7 @@ Options: """ def usage(): - print USAGE_TEXT + print(USAGE_TEXT) sys.exit(1) @@ -8339,4 +8344,3 @@ if __name__ == '__main__': main() #import pdb #pdb.run('main()') - diff --git a/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/generated/index.py b/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/generated/index.py index 7a70e14a1a..0c63512119 100644 --- a/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/generated/index.py +++ b/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/generated/index.py @@ -3,14 +3,16 @@ """ Generated Mon Feb 9 19:08:05 2009 by generateDS.py. """ +from __future__ import absolute_import +from __future__ import unicode_literals from xml.dom import minidom import os import sys -import compound +from . import compound -import indexsuper as supermod +from . import indexsuper as supermod class DoxygenTypeSub(supermod.DoxygenType): def __init__(self, version=None, compound=None): diff --git a/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/generated/indexsuper.py b/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/generated/indexsuper.py index a991530198..11312db635 100644 --- a/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/generated/indexsuper.py +++ b/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/generated/indexsuper.py @@ -4,12 +4,16 @@ # Generated Thu Jun 11 18:43:54 2009 by generateDS.py. # +from __future__ import print_function +from __future__ import unicode_literals + import sys -import getopt -from string import lower as str_lower + from xml.dom import minidom from xml.dom import Node +import six + # # User methods # @@ -19,9 +23,9 @@ from xml.dom import Node try: from generatedssuper import GeneratedsSuper -except ImportError, exp: +except ImportError as exp: - class GeneratedsSuper: + class GeneratedsSuper(object): def format_string(self, input_data, input_name=''): return input_data def format_integer(self, input_data, input_name=''): @@ -64,7 +68,7 @@ def showIndent(outfile, level): outfile.write(' ') def quote_xml(inStr): - s1 = (isinstance(inStr, basestring) and inStr or + s1 = (isinstance(inStr, six.string_types) and inStr or '%s' % inStr) s1 = s1.replace('&', '&') s1 = s1.replace('<', '<') @@ -72,7 +76,7 @@ def quote_xml(inStr): return s1 def quote_attrib(inStr): - s1 = (isinstance(inStr, basestring) and inStr or + s1 = (isinstance(inStr, six.string_types) and inStr or '%s' % inStr) s1 = s1.replace('&', '&') s1 = s1.replace('<', '<') @@ -102,7 +106,7 @@ def quote_python(inStr): return '"""%s"""' % s1 -class MixedContainer: +class MixedContainer(object): # Constants for category: CategoryNone = 0 CategoryText = 1 @@ -462,7 +466,7 @@ Options: """ def usage(): - print USAGE_TEXT + print(USAGE_TEXT) sys.exit(1) @@ -520,4 +524,3 @@ if __name__ == '__main__': main() #import pdb #pdb.run('main()') - diff --git a/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/text.py b/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/text.py index 629edd180d..de2d19b532 100644 --- a/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/text.py +++ b/gr-utils/python/modtool/gr-newmod/docs/doxygen/doxyxml/text.py @@ -21,12 +21,13 @@ """ Utilities for extracting text from generated classes. """ +from __future__ import unicode_literals def is_string(txt): if isinstance(txt, str): return True try: - if isinstance(txt, unicode): + if isinstance(txt, str): return True except NameError: pass @@ -49,7 +50,7 @@ def description_bit(obj): elif is_string(obj): return obj else: - raise StandardError('Expecting a string or something with content, content_ or value attribute') + raise Exception('Expecting a string or something with content, content_ or value attribute') # If this bit is a paragraph then add one some line breaks. if hasattr(obj, 'name') and obj.name == 'para': result += "\n\n" diff --git a/gr-utils/python/modtool/gr-newmod/docs/doxygen/swig_doc.py b/gr-utils/python/modtool/gr-newmod/docs/doxygen/swig_doc.py index d3536db8d0..c735b1291b 100644 --- a/gr-utils/python/modtool/gr-newmod/docs/doxygen/swig_doc.py +++ b/gr-utils/python/modtool/gr-newmod/docs/doxygen/swig_doc.py @@ -26,6 +26,7 @@ The file instructs SWIG to transfer the doxygen comments into the python docstrings. """ +from __future__ import unicode_literals import sys, time @@ -309,7 +310,7 @@ if __name__ == "__main__": # Parse command line options and set up doxyxml. err_msg = "Execute using: python swig_doc.py xml_path outputfilename" if len(sys.argv) != 3: - raise StandardError(err_msg) + raise Exception(err_msg) xml_path = sys.argv[1] swigdocfilename = sys.argv[2] di = DoxyIndex(xml_path) |