epydoc-commits Mailing List for Python API documentation generation tool (Page 23)
Brought to you by:
edloper
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
(77) |
May
|
Jun
(6) |
Jul
(8) |
Aug
(91) |
Sep
(67) |
Oct
(4) |
Nov
|
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(17) |
Feb
(135) |
Mar
(25) |
Apr
|
May
(1) |
Jun
(1) |
Jul
(7) |
Aug
|
Sep
(62) |
Oct
(1) |
Nov
(3) |
Dec
|
2008 |
Jan
(40) |
Feb
(102) |
Mar
(5) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <ed...@us...> - 2006-08-21 09:40:21
|
Revision: 1260 Author: edloper Date: 2006-08-21 02:40:18 -0700 (Mon, 21 Aug 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1260&view=rev Log Message: ----------- Applied SF patch [ 1531588 ] Bugfix: make :author: work in restructuredtext markup. (Disables a transform that's performed by docutils by default.) Modified Paths: -------------- trunk/epydoc/src/epydoc/markup/restructuredtext.py Modified: trunk/epydoc/src/epydoc/markup/restructuredtext.py =================================================================== --- trunk/epydoc/src/epydoc/markup/restructuredtext.py 2006-08-21 09:28:11 UTC (rev 1259) +++ trunk/epydoc/src/epydoc/markup/restructuredtext.py 2006-08-21 09:40:18 UTC (rev 1260) @@ -79,6 +79,7 @@ from docutils.frontend import OptionParser from docutils.parsers.rst import directives import docutils.nodes +import docutils.transforms.frontmatter from epydoc.compat import * # Backwards compatibility from epydoc.markup import * @@ -192,6 +193,11 @@ A reader that captures all errors that are generated by parsing, and appends them to a list. """ + # Do not translate <field>author</field> to <author> + default_transforms = list(StandaloneReader.default_transforms) + try: default_transforms.remove(docutils.transforms.frontmatter.DocInfo) + except ValueError: pass + def __init__(self, errors): self._errors = errors StandaloneReader.__init__(self) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2006-08-21 09:28:20
|
Revision: 1259 Author: edloper Date: 2006-08-21 02:28:11 -0700 (Mon, 21 Aug 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1259&view=rev Log Message: ----------- Fixed SF bug [ 1475000 ] --show-sourcecode ignored. The .pyc filename was being used as module.filename, and so the html writer was concluding that there wasn't a file to write code from. Modified Paths: -------------- trunk/epydoc/src/epydoc/docintrospecter.py Modified: trunk/epydoc/src/epydoc/docintrospecter.py =================================================================== --- trunk/epydoc/src/epydoc/docintrospecter.py 2006-08-21 09:16:55 UTC (rev 1258) +++ trunk/epydoc/src/epydoc/docintrospecter.py 2006-08-21 09:28:11 UTC (rev 1259) @@ -225,6 +225,8 @@ try: module_doc.filename = unicode(module.__file__) except KeyboardInterrupt: raise except: pass + if module_doc.filename is not UNKNOWN: + module_doc.filename = py_src_filename(module_doc.filename) # If this is just a preliminary introspection, then don't do # anything else. (Typically this is true if this module was This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2006-08-21 09:17:00
|
Revision: 1258 Author: edloper Date: 2006-08-21 02:16:55 -0700 (Mon, 21 Aug 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1258&view=rev Log Message: ----------- made 'ouptput' option in config file case insensitive Modified Paths: -------------- trunk/epydoc/src/epydoc/cli.py Modified: trunk/epydoc/src/epydoc/cli.py =================================================================== --- trunk/epydoc/src/epydoc/cli.py 2006-08-21 09:06:08 UTC (rev 1257) +++ trunk/epydoc/src/epydoc/cli.py 2006-08-21 09:16:55 UTC (rev 1258) @@ -312,7 +312,7 @@ 'module', 'object', 'value'): names.extend(val.replace(',', ' ').split()) elif optname == 'output': - if val not in ACTIONS: + if val.lower() not in ACTIONS: raise ValueError('"%s" expected one of: %s' % (optname, ', '.join(ACTIONS))) options.action = val.lower() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2006-08-21 09:06:12
|
Revision: 1257 Author: edloper Date: 2006-08-21 02:06:08 -0700 (Mon, 21 Aug 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1257&view=rev Log Message: ----------- - Made a few fixes to expand/collapse code: - functions & classes should be collapseable even if they're inside a top-level control block - functions & classes should *not* be collapseable if they're inside another function. - when finding link targets, a None in self.context should not count as giving a null-context. - When popping up a box to ask the user which of several objects with the same name they want, use full (not contextualized) names. Modified Paths: -------------- trunk/epydoc/src/epydoc/docwriter/html_colorize.py Modified: trunk/epydoc/src/epydoc/docwriter/html_colorize.py =================================================================== --- trunk/epydoc/src/epydoc/docwriter/html_colorize.py 2006-08-21 08:12:21 UTC (rev 1256) +++ trunk/epydoc/src/epydoc/docwriter/html_colorize.py 2006-08-21 09:06:08 UTC (rev 1257) @@ -659,6 +659,11 @@ #: class or function definition. self.context = [] + #: A list, corresponding one-to-one with L{self.context}, + #: indicating the type of each entry. Each element of + #: C{context_types} is one of: C{'func'}, C{'class'}, C{None}. + self.context_types = [] + #: A list of indentation strings for each of the current #: block's indents. I.e., the current total indentation can #: be found by taking C{''.join(self.indents)}. @@ -672,6 +677,12 @@ #: logical line was not a class or function definition. self.def_name = None + #: The type of the class or function whose definition started + #: on the previous logical line, or C{None} if the previous + #: logical line was not a class or function definition. + #: Can be C{'func'}, C{'class'}, C{None}. + self.def_type = None + def find_line_offsets(self): """ @@ -702,9 +713,11 @@ self.pos = 0 self.cur_line = [] self.context = [] + self.context_types = [] self.indents = [] self.lineno = 1 self.def_name = None + self.def_type = None # Load the module's text. self.text = open(self.module_filename).read() @@ -795,6 +808,13 @@ # this line; or None if no funciton or class is defined. def_name = None + # def_type is the type of the function or class defined by + # this line; or None if no funciton or class is defined. + def_type = None + + # does this line start a class/func def? + starting_def_block = False + in_base_list = False in_param_list = False in_param_default = 0 @@ -834,10 +854,12 @@ in_base_list = True css_class = self.CSS_CLASSES['DEFNAME'] def_name = toktext - if None not in self.context: - cls_name = '.'.join(self.context+[def_name]) + def_type = 'class' + if 'func' not in self.context_types: + cls_name = self.context_name(def_name) url = self.name2url(cls_name) s = self.mark_def(s, cls_name) + starting_def_block = True # Is this token the function name in a function def? If # so, then make it a link back into the API docs. @@ -845,11 +867,13 @@ in_param_list = True css_class = self.CSS_CLASSES['DEFNAME'] def_name = toktext - if None not in self.context: - cls_name = '.'.join(self.context) - func_name = '.'.join(self.context+[def_name]) + def_type = 'func' + if 'func' not in self.context_types: + cls_name = self.context_name() + func_name = self.context_name(def_name) url = self.name2url(cls_name, def_name) s = self.mark_def(s, func_name) + starting_def_block = True # For each indent, update the indents list (which we use # to keep track of indentation strings) and the context @@ -859,6 +883,7 @@ elif toktype == token.INDENT: self.indents.append(toktext) self.context.append(self.def_name) + self.context_types.append(self.def_type) # When we dedent, pop the last elements off the indents # list and the context list. If the last context element @@ -866,6 +891,7 @@ # block; so write an end-div tag. elif toktype == token.DEDENT: self.indents.pop() + self.context_types.pop() if self.context.pop(): ended_def_blocks += 1 @@ -909,8 +935,9 @@ # a function, then that function is our context, not # the namespace that contains it. [xx] this isn't always # the right thing to do. - if None not in self.context and self.GUESS_LINK_TARGETS: - container = DottedName(self.module_name, *self.context) + if self.GUESS_LINK_TARGETS: + context = [n for n in self.context if n is not None] + container = DottedName(self.module_name, *context) doc = self.docindex.get_vardoc(container+toktext) if doc is not None: url = self.url_func(doc) @@ -989,27 +1016,33 @@ # Write the line. self.out(s) - if def_name and None not in self.context: + if def_name and starting_def_block: self.out('</div>') # Add div's if we're starting a def block. - if (self.ADD_DEF_BLOCKS and def_name and - (line[-2][1] == ':') and None not in self.context): + if (self.ADD_DEF_BLOCKS and def_name and starting_def_block and + (line[-2][1] == ':')): indentation = (''.join(self.indents)+' ').replace(' ', '+') linenum_padding = '+'*self.linenum_size - name='.'.join(self.context+[def_name]) + name=self.context_name(def_name) self.out(self.START_DEF_BLOCK % (name, linenum_padding, indentation, name)) self.def_name = def_name + self.def_type = def_type + def context_name(self, extra=None): + pieces = [n for n in self.context if n is not None] + if extra is not None: pieces.append(extra) + return '.'.join(pieces) + def doclink(self, name, docs): uid = 'link-%s' % self._next_uid self._next_uid += 1 - if None not in self.context: - container = DottedName(self.module_name, *self.context) - else: - container = None + context = [n for n in self.context if n is not None] + container = DottedName(self.module_name, *context) + #else: + # container = None targets = ['%s=%s' % (str(self.doc_descr(d,container)), str(self.url_func(d))) for d in docs] @@ -1018,7 +1051,7 @@ return uid, onclick def doc_descr(self, doc, context): - name = str(doc.canonical_name.contextualize(context)) + name = str(doc.canonical_name) descr = '%s %s' % (self.doc_kind(doc), name) if isinstance(doc, RoutineDoc): descr += '()' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2006-08-21 08:12:25
|
Revision: 1256 Author: edloper Date: 2006-08-21 01:12:21 -0700 (Mon, 21 Aug 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1256&view=rev Log Message: ----------- - Fixed two javascript bugs Modified Paths: -------------- trunk/epydoc/src/epydoc/docwriter/html_colorize.py Modified: trunk/epydoc/src/epydoc/docwriter/html_colorize.py =================================================================== --- trunk/epydoc/src/epydoc/docwriter/html_colorize.py 2006-08-21 08:11:42 UTC (rev 1255) +++ trunk/epydoc/src/epydoc/docwriter/html_colorize.py 2006-08-21 08:12:21 UTC (rev 1256) @@ -339,8 +339,8 @@ if (elt) { elt.style.display = "block"; - var indent = elt.indent; - var pad = elt.pad; + var indent = elt.getAttribute("indent"); + var pad = elt.getAttribute("pad"); var s = "<span class=\'py-lineno\'>"; for (var i=0; i<pad.length; i++) { s += " " } s += "</span>"; @@ -393,7 +393,7 @@ function expandto(href) { var start = href.indexOf("#")+1; - if (start != 0) { + if (start != 0 && start != href.length) { if (href.substring(start, href.length) != "-") { collapse_all(4); pos = href.indexOf(".", start); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2006-08-21 08:11:47
|
Revision: 1255 Author: edloper Date: 2006-08-21 01:11:42 -0700 (Mon, 21 Aug 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1255&view=rev Log Message: ----------- - Fixed typo in variable-ellipsis css Modified Paths: -------------- trunk/epydoc/src/epydoc/docwriter/html_css.py Modified: trunk/epydoc/src/epydoc/docwriter/html_css.py =================================================================== --- trunk/epydoc/src/epydoc/docwriter/html_css.py 2006-08-21 07:17:10 UTC (rev 1254) +++ trunk/epydoc/src/epydoc/docwriter/html_css.py 2006-08-21 08:11:42 UTC (rev 1255) @@ -202,7 +202,7 @@ background: #dce4ec; color: #000000; border: 1px solid #708890; } .variable-linewrap { color: #604000; font-weight: bold; } -.variable-ellipsis { color: #604000; font-weight; bold; } +.variable-ellipsis { color: #604000; font-weight: bold; } .variable-quote { color: #604000; font-weight: bold; } .re { color: #000000; } .re-char { color: #006030; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2006-08-21 07:20:26
|
Revision: 1252 Author: edloper Date: 2006-08-21 00:04:18 -0700 (Mon, 21 Aug 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1252&view=rev Log Message: ----------- - Fixed sf bug #1510231 "frames" directive ignored in configuration file Modified Paths: -------------- trunk/epydoc/src/epydoc/cli.py Modified: trunk/epydoc/src/epydoc/cli.py =================================================================== --- trunk/epydoc/src/epydoc/cli.py 2006-08-21 07:02:32 UTC (rev 1251) +++ trunk/epydoc/src/epydoc/cli.py 2006-08-21 07:04:18 UTC (rev 1252) @@ -338,7 +338,7 @@ elif optname == 'help': options.help_file = val elif optname =='frames': - options.frames = _str_to_bool(val, optname) + options.show_frames = _str_to_bool(val, optname) elif optname =='private': options.private = _str_to_bool(val, optname) elif optname =='imports': This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2006-08-21 07:20:22
|
Revision: 1251 Author: edloper Date: 2006-08-21 00:02:32 -0700 (Mon, 21 Aug 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1251&view=rev Log Message: ----------- - Fixed sf bug #1501876 -- Decorators stay in effect past correct scope Modified Paths: -------------- trunk/epydoc/src/epydoc/docparser.py Modified: trunk/epydoc/src/epydoc/docparser.py =================================================================== --- trunk/epydoc/src/epydoc/docparser.py 2006-08-21 06:44:58 UTC (rev 1250) +++ trunk/epydoc/src/epydoc/docparser.py 2006-08-21 07:02:32 UTC (rev 1251) @@ -669,6 +669,7 @@ line_toks = [] lineno = None comments = [] + decorators = [] def add_to_group(container, api_doc, group_name): if container.group_specs == UNKNOWN: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2006-08-21 07:17:19
|
Revision: 1254 Author: edloper Date: 2006-08-21 00:17:10 -0700 (Mon, 21 Aug 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1254&view=rev Log Message: ----------- - Minor typographic update. Modified Paths: -------------- trunk/epydoc/src/epydoc/test/docintrospecter.doctest Modified: trunk/epydoc/src/epydoc/test/docintrospecter.doctest =================================================================== --- trunk/epydoc/src/epydoc/test/docintrospecter.doctest 2006-08-21 07:16:15 UTC (rev 1253) +++ trunk/epydoc/src/epydoc/test/docintrospecter.doctest 2006-08-21 07:17:10 UTC (rev 1254) @@ -1,5 +1,5 @@ Regression Testing for epydoc.docintrospecter - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The `epydoc.docintrospecter` module is used to extract API documentation by introspecting Python objects directy. Its primary interface is `introspect_docs()`, which takes a Python object, and returns a This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2006-08-21 07:16:21
|
Revision: 1253 Author: edloper Date: 2006-08-21 00:16:15 -0700 (Mon, 21 Aug 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1253&view=rev Log Message: ----------- - Changed all cases where UNKNOWN was tested with == or != to use "is" and "is not" instead. (UNKNOWN is defined to be a unique value, so it should always be tested by identity, like None). This should fix sf bug #1506850. Modified Paths: -------------- trunk/epydoc/src/epydoc/apidoc.py trunk/epydoc/src/epydoc/cli.py trunk/epydoc/src/epydoc/docbuilder.py trunk/epydoc/src/epydoc/docintrospecter.py trunk/epydoc/src/epydoc/docparser.py trunk/epydoc/src/epydoc/docstringparser.py Modified: trunk/epydoc/src/epydoc/apidoc.py =================================================================== --- trunk/epydoc/src/epydoc/apidoc.py 2006-08-21 07:04:18 UTC (rev 1252) +++ trunk/epydoc/src/epydoc/apidoc.py 2006-08-21 07:16:15 UTC (rev 1253) @@ -722,7 +722,7 @@ or UNKNOWN if we don't succeed. This should probably eventually be replaced by more of a safe-repr variant. """ - if self.pyval == UNKNOWN: + if self.pyval is UNKNOWN: return UNKNOWN try: s = '%r' % self.pyval @@ -798,7 +798,7 @@ def __init__(self, **kwargs): kwargs.setdefault('variables', {}) APIDoc.__init__(self, **kwargs) - assert self.variables != UNKNOWN + assert self.variables is not UNKNOWN def apidoc_links(self, **filters): variables = filters.get('variables', True) @@ -854,7 +854,7 @@ Initialize the L{variable_groups} attribute, based on the L{sorted_variables} and L{group_specs} attributes. """ - if self.sorted_variables == UNKNOWN: + if self.sorted_variables is UNKNOWN: self.init_sorted_variables assert len(self.sorted_variables) == len(self.variables) @@ -1008,8 +1008,8 @@ variables that do not belong to any group. @type group: C{string} """ - if (self.sorted_variables == UNKNOWN or - self.variable_groups == UNKNOWN): + if (self.sorted_variables is UNKNOWN or + self.variable_groups is UNKNOWN): raise ValueError('sorted_variables and variable_groups ' 'must be initialized first.') @@ -1199,8 +1199,8 @@ local variables; if C{True}, then return only inherited variables; if C{False}, then return only local variables. """ - if (self.sorted_variables == UNKNOWN or - self.variable_groups == UNKNOWN): + if (self.sorted_variables is UNKNOWN or + self.variable_groups is UNKNOWN): raise ValueError('sorted_variables and variable_groups ' 'must be initialized first.') @@ -1528,7 +1528,7 @@ child_var = val_doc.variables.get(identifier) if child_var is not None: child_val = child_var.value - if child_val == UNKNOWN: child_val = None + if child_val is UNKNOWN: child_val = None return child_var, child_val # If that fails, then see if it's a submodule. @@ -1627,7 +1627,7 @@ return api_doc.container if len(api_doc.canonical_name) == 1: return None - elif isinstance(api_doc, ModuleDoc) and api_doc.package != UNKNOWN: + elif isinstance(api_doc, ModuleDoc) and api_doc.package is not UNKNOWN: return api_doc.package else: parent = api_doc.canonical_name.container() Modified: trunk/epydoc/src/epydoc/cli.py =================================================================== --- trunk/epydoc/src/epydoc/cli.py 2006-08-21 07:04:18 UTC (rev 1252) +++ trunk/epydoc/src/epydoc/cli.py 2006-08-21 07:16:15 UTC (rev 1253) @@ -939,7 +939,7 @@ p = ((sum(self.stages[:i]) + percent*self.stages[i]) / float(sum(self.stages))) - if message == UNKNOWN: message = None + if message is UNKNOWN: message = None if message: message = '%s: %s' % (self.task, message) ConsoleLogger.progress(self, p, message) Modified: trunk/epydoc/src/epydoc/docbuilder.py =================================================================== --- trunk/epydoc/src/epydoc/docbuilder.py 2006-08-21 07:04:18 UTC (rev 1252) +++ trunk/epydoc/src/epydoc/docbuilder.py 2006-08-21 07:16:15 UTC (rev 1253) @@ -218,7 +218,7 @@ def _report_valdoc_progress(i, val_doc, val_docs): if (isinstance(val_doc, (ModuleDoc, ClassDoc)) and - val_doc.canonical_name != UNKNOWN and + val_doc.canonical_name is not UNKNOWN and not val_doc.canonical_name[0].startswith('??')): log.progress(float(i)/len(val_docs), val_doc.canonical_name) @@ -731,7 +731,7 @@ def _merge_posargs_and_defaults(introspect_doc, parse_doc, path): # If either is unknown, then let merge_attrib handle it. - if introspect_doc.posargs == UNKNOWN or parse_doc.posargs == UNKNOWN: + if introspect_doc.posargs is UNKNOWN or parse_doc.posargs is UNKNOWN: return # If the introspected doc just has '...', then trust the parsed doc. @@ -877,7 +877,7 @@ return defaults def merge_docstring(docstring1, docstring2, precedence, cyclecheck, path): - if docstring1 in (None, UNKNOWN) or precedence=='parse': + if docstring1 is None or docstring1 is UNKNOWN or precedence=='parse': return docstring2 else: return docstring1 @@ -1116,7 +1116,7 @@ # local, then record the fact that it overrides # var_doc. elif (class_doc.variables[name].container==class_doc and - class_doc.variables[name].overrides==UNKNOWN): + class_doc.variables[name].overrides is UNKNOWN): class_doc.variables[name].overrides = var_doc _inherit_info(class_doc.variables[name]) Modified: trunk/epydoc/src/epydoc/docintrospecter.py =================================================================== --- trunk/epydoc/src/epydoc/docintrospecter.py 2006-08-21 07:04:18 UTC (rev 1252) +++ trunk/epydoc/src/epydoc/docintrospecter.py 2006-08-21 07:16:15 UTC (rev 1253) @@ -149,7 +149,7 @@ introspect_func(value, val_doc) # Set canonical name, if it was given - if val_doc.canonical_name == UNKNOWN and name is not None: + if val_doc.canonical_name is UNKNOWN and name is not None: val_doc.canonical_name = DottedName(name) # If we were given a filename, but didn't manage to get a @@ -160,7 +160,7 @@ if is_script and filename is not None: val_doc.canonical_name = DottedName(munge_script_name(str(filename))) - if val_doc.canonical_name == UNKNOWN and filename is not None: + if val_doc.canonical_name is UNKNOWN and filename is not None: shadowed_name = DottedName(value.__name__) log.warning("Module %s is shadowed by a variable with " "the same name." % shadowed_name) @@ -583,7 +583,7 @@ Verify the name. E.g., if it's a nested class, then we won't be able to find it with the name we constructed. """ - if dotted_name == UNKNOWN: return UNKNOWN + if dotted_name is UNKNOWN: return UNKNOWN if len(dotted_name) == 1 and hasattr(__builtin__, dotted_name[0]): return dotted_name named_value = sys.modules.get(dotted_name[0]) @@ -864,7 +864,7 @@ """ if api_doc.docstring_lineno is not UNKNOWN: return api_doc.docstring_lineno - if isinstance(api_doc, ValueDoc) and api_doc.pyval != UNKNOWN: + if isinstance(api_doc, ValueDoc) and api_doc.pyval is not UNKNOWN: try: lines, lineno = inspect.findsource(api_doc.pyval) if not isinstance(api_doc, ModuleDoc): lineno += 1 Modified: trunk/epydoc/src/epydoc/docparser.py =================================================================== --- trunk/epydoc/src/epydoc/docparser.py 2006-08-21 07:04:18 UTC (rev 1252) +++ trunk/epydoc/src/epydoc/docparser.py 2006-08-21 07:16:15 UTC (rev 1253) @@ -234,7 +234,7 @@ "with filename, not with name.") name = DottedName(name) val_doc = _find(name) - if val_doc.canonical_name == UNKNOWN: + if val_doc.canonical_name is UNKNOWN: val_doc.canonical_name = name return val_doc @@ -451,7 +451,7 @@ raise ImportError('Could not find value') def _get_filename(identifier, path=None): - if path == UNKNOWN: path = None + if path is UNKNOWN: path = None try: fp, filename, (s,m,typ) = imp.find_module(identifier, path) if fp is not None: fp.close() @@ -672,7 +672,7 @@ decorators = [] def add_to_group(container, api_doc, group_name): - if container.group_specs == UNKNOWN: + if container.group_specs is UNKNOWN: container.group_specs = [] if isinstance(api_doc, VariableDoc): @@ -1545,7 +1545,7 @@ #raise ParseError("Could not find %s" % name) # If the variable has a value, return that value. - if base_var.value != UNKNOWN: + if base_var.value is not UNKNOWN: return base_var.value # Otherwise, if BASE_HANDLING is 'parse', try parsing the docs for @@ -1766,7 +1766,7 @@ namespace.sort_spec.remove(var_doc.name) old_var_doc = namespace.variables[var_doc.name] if (old_var_doc.is_alias == False and - old_var_doc.value != UNKNOWN): + old_var_doc.value is not UNKNOWN): old_var_doc.value.canonical_name = UNKNOWN if (preserve_docstring and var_doc.docstring in (None, UNKNOWN) and old_var_doc.docstring not in (None, UNKNOWN)): @@ -1860,7 +1860,7 @@ if isinstance(var_doc.value, NamespaceDoc): var_dict = var_doc.value.variables - elif (var_doc.value == UNKNOWN and + elif (var_doc.value is UNKNOWN and var_doc.imported_from not in (None, UNKNOWN)): src_name = var_doc.imported_from + dotted_name[i:] # [xx] do I want to create a proxy here?? Modified: trunk/epydoc/src/epydoc/docstringparser.py =================================================================== --- trunk/epydoc/src/epydoc/docstringparser.py 2006-08-21 07:04:18 UTC (rev 1252) +++ trunk/epydoc/src/epydoc/docstringparser.py 2006-08-21 07:16:15 UTC (rev 1253) @@ -251,7 +251,7 @@ # filename of its containing module. name = api_doc.canonical_name module = api_doc.defining_module - if module != UNKNOWN and module.filename not in (None, UNKNOWN): + if module is not UNKNOWN and module.filename not in (None, UNKNOWN): try: filename = py_src_filename(module.filename) except: filename = module.filename else: @@ -629,7 +629,7 @@ # Find the module that defines api_doc. module = api_doc.defining_module # Look up its docformat. - if module != UNKNOWN and module.docformat not in (None, UNKNOWN): + if module is not UNKNOWN and module.docformat not in (None, UNKNOWN): docformat = module.docformat else: docformat = DEFAULT_DOCFORMAT This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2006-08-21 06:45:06
|
Revision: 1250 Author: edloper Date: 2006-08-20 23:44:58 -0700 (Sun, 20 Aug 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1250&view=rev Log Message: ----------- - Fixed sf bug #1509415, where epydoc would crash on a "malformed" @raise field Modified Paths: -------------- trunk/epydoc/src/epydoc/docwriter/html.py Modified: trunk/epydoc/src/epydoc/docwriter/html.py =================================================================== --- trunk/epydoc/src/epydoc/docwriter/html.py 2006-08-21 05:53:23 UTC (rev 1249) +++ trunk/epydoc/src/epydoc/docwriter/html.py 2006-08-21 06:44:58 UTC (rev 1250) @@ -2028,9 +2028,11 @@ <dl><dt>Raises:</dt></dl> <ul class="nomargin"> >>> for name, descr in func_doc.exception_descrs: + >>> name = self.href(self.docindex.find(name, func_doc), + >>> label=str(name)) $self.labelled_list_item( "<code><strong class=\'fraise\'>" + - self.href(name) + "</strong></code>", + name + "</strong></code>", self.docstring_to_html(descr, func_doc, 8))$ >>> #endfor </ul> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2006-08-21 05:53:28
|
Revision: 1249 Author: edloper Date: 2006-08-20 22:53:23 -0700 (Sun, 20 Aug 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1249&view=rev Log Message: ----------- - Fixed sf bug #1542936 , where source code colorization would fail because doclink targets were added as unicode. Modified Paths: -------------- trunk/epydoc/src/epydoc/docwriter/html_colorize.py Modified: trunk/epydoc/src/epydoc/docwriter/html_colorize.py =================================================================== --- trunk/epydoc/src/epydoc/docwriter/html_colorize.py 2006-08-21 05:37:41 UTC (rev 1248) +++ trunk/epydoc/src/epydoc/docwriter/html_colorize.py 2006-08-21 05:53:23 UTC (rev 1249) @@ -963,7 +963,6 @@ url = url.encode('ascii', 'xmlcharrefreplace') s += ('<a%s%s href="%s">' % (tooltip_html, css_class_html, url)) - assert type(s) is str # *not* unicode! elif css_class_html or tooltip_html: s += '<span%s%s>' % (tooltip_html, css_class_html) if i == len(line)-1: @@ -1011,7 +1010,8 @@ container = DottedName(self.module_name, *self.context) else: container = None - targets = ['%s=%s' % (self.doc_descr(d,container), self.url_func(d)) + targets = ['%s=%s' % (str(self.doc_descr(d,container)), + str(self.url_func(d))) for d in docs] onclick = ("doclink('%s', '%s', '%s'); return false;" % (uid, name, ','.join(targets))) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2006-08-21 05:37:45
|
Revision: 1248 Author: edloper Date: 2006-08-20 22:37:41 -0700 (Sun, 20 Aug 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1248&view=rev Log Message: ----------- - Fixed sf bug #1543572, where source code colorization would fail because names & tooltips were added as unicode. Modified Paths: -------------- trunk/epydoc/src/epydoc/docwriter/html_colorize.py Modified: trunk/epydoc/src/epydoc/docwriter/html_colorize.py =================================================================== --- trunk/epydoc/src/epydoc/docwriter/html_colorize.py 2006-08-21 05:34:35 UTC (rev 1247) +++ trunk/epydoc/src/epydoc/docwriter/html_colorize.py 2006-08-21 05:37:41 UTC (rev 1248) @@ -812,7 +812,14 @@ # Loop through each token, and colorize it appropriately. for i, (toktype, toktext) in enumerate(line): - assert type(s) is str # *not* unicode! + if type(s) is not str: + if type(s) is unicode: + log.error('While colorizing %s -- got unexpected ' + 'unicode string' % self.module_name) + s = s.encode('ascii', 'xmlcharrefreplace') + else: + raise ValueError('Unexpected value for s -- %s' % + type(s).__name__) # For each token, determine its css class and whether it # should link to a url. @@ -912,7 +919,7 @@ if url is None: docs = sorted(self.name_to_docs.get(toktext, [])) if docs: - tooltip='\n'.join(['%s'%d.canonical_name + tooltip='\n'.join([str(d.canonical_name) for d in docs]) if len(docs) == 1 and self.GUESS_LINK_TARGETS: url = self.url_func(docs[0]) @@ -1011,7 +1018,7 @@ return uid, onclick def doc_descr(self, doc, context): - name = doc.canonical_name.contextualize(context) + name = str(doc.canonical_name.contextualize(context)) descr = '%s %s' % (self.doc_kind(doc), name) if isinstance(doc, RoutineDoc): descr += '()' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2006-08-21 05:34:39
|
Revision: 1247 Author: edloper Date: 2006-08-20 22:34:35 -0700 (Sun, 20 Aug 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1247&view=rev Log Message: ----------- - Modified encoding doctest function to use monkey-patching to get at generated docstrings, rather than using trickery to parse the generated html. Modified Paths: -------------- trunk/epydoc/src/epydoc/test/encoding.doctest Modified: trunk/epydoc/src/epydoc/test/encoding.doctest =================================================================== --- trunk/epydoc/src/epydoc/test/encoding.doctest 2006-07-11 13:41:33 UTC (rev 1246) +++ trunk/epydoc/src/epydoc/test/encoding.doctest 2006-08-21 05:34:35 UTC (rev 1247) @@ -6,16 +6,27 @@ encodings. It takes a given string, writes it to a python file, and processes that file's documentation. It then generates HTML output from the documentation, extracts all docstrings from the generated -HTML output, and displays them. +HTML output, and displays them. (In order to extract & display all +docstrings, it monkey-patches the HMTLwriter.docstring_to_html() +method.) >>> # Display warninings & errors: >>> from epydoc import log >>> log.register_logger(log.SimpleLogger()) + >>> # Other imports: >>> import tempfile, os, re, textwrap, sys >>> from epydoc.docbuilder import build_doc_index >>> from epydoc.docwriter.html import HTMLWriter - >>> # Test function: + + >>> # Monkey-patch the write function: + >>> def docstring_to_html(self, parsed_docstring, w=None, i=0): + ... s = parsed_docstring.to_html(None).strip() + ... print s.encode('ascii', 'xmlcharrefreplace') + ... return '' + >>> HTMLWriter.docstring_to_html = docstring_to_html + + >>> # The actual test function: >>> def test(s, introspect=True, parse=True, debug=False): ... # Write s to a temporary file. ... tmp_dir = tempfile.mkdtemp() @@ -28,22 +39,10 @@ ... if docindex is None: return ... try: del sys.modules['enc_test'] ... except: pass - ... # Write html output + ... # Write html output. ... writer = HTMLWriter(docindex, mark_docstrings=True) ... writer.write(tmp_dir) - ... files = os.listdir(tmp_dir) - ... files.sort() - ... for file in files: - ... if re.match(r'enc_test.*-(module|class)\.html', file): - ... print '='*75 - ... print 'In %s:' % file - ... s = open(os.path.join(tmp_dir,file)).read() - ... if debug: print s - ... for m in re.finditer(r'<span class="docstring">([\s\S]*?)' - ... r'</span><!--end docstring-->', - ... s): - ... docstr = remove_surrogates(m.group(1).strip()) - ... if docstr: print '-'*75+'\n'+docstr + ... for file in os.listdir(tmp_dir): ... os.unlink(os.path.join(tmp_dir,file)) ... os.rmdir(tmp_dir) @@ -74,41 +73,26 @@ >>> test('''# -*- coding: cp874 -*- ... """abc ABC 123 \x80 \x85""" ... ''') - =========================================================================== - In enc_test-module.html: - --------------------------------------------------------------------------- abc ABC 123 € … >>> test('''# -*- coding: cp1250 -*- ... """abc ABC 123 \x80 \x82 \x84 \x85 \xff""" ... ''') - =========================================================================== - In enc_test-module.html: - --------------------------------------------------------------------------- abc ABC 123 € ‚ „ … ˙ >>> test('''# -*- coding: cp1251 -*- ... """abc ABC 123 \x80 \x81 \x82 \xff""" ... ''') - =========================================================================== - In enc_test-module.html: - --------------------------------------------------------------------------- abc ABC 123 Ђ Ѓ ‚ я >>> test('''# -*- coding: cp1252 -*- ... """abc ABC 123 \x80 \x82 \x83 \xff""" ... ''') - =========================================================================== - In enc_test-module.html: - --------------------------------------------------------------------------- abc ABC 123 € ‚ ƒ ÿ >>> test('''# -*- coding: cp1253 -*- ... """abc ABC 123 \x80 \x82 \x83 \xfe""" ... ''') - =========================================================================== - In enc_test-module.html: - --------------------------------------------------------------------------- abc ABC 123 € ‚ ƒ ώ Unicode tests: @@ -130,9 +114,6 @@ >>> # UTF-8 with a coding directive: >>> test("# -*- coding: utf-8 -*-\n"+utf8_test) - =========================================================================== - In enc_test-module.html: - --------------------------------------------------------------------------- <p>abc ABC 123</p> <p>0x80-0x7ff range: €  ߾ ߿</p> <p>0x800-0xffff range: ࠀ ࠁ  </p> @@ -140,9 +121,6 @@ >>> # UTF-8 with a BOM & a coding directive: >>> test(utf8_bom+"# -*- coding: utf-8 -*-\n"+utf8_test) - =========================================================================== - In enc_test-module.html: - --------------------------------------------------------------------------- <p>abc ABC 123</p> <p>0x80-0x7ff range: €  ߾ ߿</p> <p>0x800-0xffff range: ࠀ ࠁ  </p> @@ -150,9 +128,6 @@ >>> # UTF-8 with a BOM & no coding directive: >>> test(utf8_bom+utf8_test) - =========================================================================== - In enc_test-module.html: - --------------------------------------------------------------------------- <p>abc ABC 123</p> <p>0x80-0x7ff range: €  ߾ ߿</p> <p>0x800-0xffff range: ࠀ ࠁ  </p> @@ -163,9 +138,6 @@ >>> test('''# -*- coding: koi8-r -*- ... """abc ABC 123 \x80 \x82 \x83 \xff""" ... ''') - =========================================================================== - In enc_test-module.html: - --------------------------------------------------------------------------- abc ABC 123 ─ ┌ ┐ Ъ Tests for 'coding' directive on the second line: @@ -173,32 +145,20 @@ >>> test('''\n# -*- coding: cp1252 -*- ... """abc ABC 123 \x80 \x82 \x83 \xff""" ... ''') - =========================================================================== - In enc_test-module.html: - --------------------------------------------------------------------------- abc ABC 123 € ‚ ƒ ÿ >>> test('''# comment on the first line.\n# -*- coding: cp1252 -*- ... """abc ABC 123 \x80 \x82 \x83 \xff""" ... ''') - =========================================================================== - In enc_test-module.html: - --------------------------------------------------------------------------- abc ABC 123 € ‚ ƒ ÿ >>> test("\n# -*- coding: utf-8 -*-\n"+utf8_test) - =========================================================================== - In enc_test-module.html: - --------------------------------------------------------------------------- <p>abc ABC 123</p> <p>0x80-0x7ff range: €  ߾ ߿</p> <p>0x800-0xffff range: ࠀ ࠁ  </p> 0x10000-0x10ffff range: 𐀀 𐀁   >>> test("# comment\n# -*- coding: utf-8 -*-\n"+utf8_test) - =========================================================================== - In enc_test-module.html: - --------------------------------------------------------------------------- <p>abc ABC 123</p> <p>0x80-0x7ff range: €  ߾ ߿</p> <p>0x800-0xffff range: ࠀ ࠁ  </p> @@ -209,9 +169,6 @@ >>> test('''# -*- coding: shift_jis -*- ... """abc ABC 123 \xA1 \xA2 \xA3""" ... ''') - =========================================================================== - In enc_test-module.html: - --------------------------------------------------------------------------- abc ABC 123 。 「 」 Str/Unicode Test @@ -221,17 +178,11 @@ >>> test('''# -*- coding: utf-8 -*- ... """abc ABC 123 \xc2\x80 \xdf\xbf \xe0\xa0\x80""" ... ''') - =========================================================================== - In enc_test-module.html: - --------------------------------------------------------------------------- abc ABC 123 € ߿ ࠀ >>> test('''# -*- coding: utf-8 -*- ... u"""abc ABC 123 \xc2\x80 \xdf\xbf \xe0\xa0\x80""" ... ''') - =========================================================================== - In enc_test-module.html: - --------------------------------------------------------------------------- abc ABC 123 € ߿ ࠀ Under special circumstances, we may not be able to tell what the @@ -249,11 +200,7 @@ ... p=property(doc="""\xc2\x80""") ... ''') # doctest: +ELLIPSIS <property object at ...>'s docstring is not a unicode string, but it contains non-ascii data -- treating it as latin-1. - =========================================================================== - In enc_test-module.html: - --------------------------------------------------------------------------- € - --------------------------------------------------------------------------- € Introspection/Parsing Tests @@ -262,50 +209,32 @@ getting the right results. >>> test("# -*- coding: utf-8 -*-\n"+utf8_test, introspect=False) - =========================================================================== - In enc_test-module.html: - --------------------------------------------------------------------------- <p>abc ABC 123</p> <p>0x80-0x7ff range: €  ߾ ߿</p> <p>0x800-0xffff range: ࠀ ࠁ  </p> 0x10000-0x10ffff range: 𐀀 𐀁   >>> test(utf8_bom+"# -*- coding: utf-8 -*-\n"+utf8_test, introspect=False) - =========================================================================== - In enc_test-module.html: - --------------------------------------------------------------------------- <p>abc ABC 123</p> <p>0x80-0x7ff range: €  ߾ ߿</p> <p>0x800-0xffff range: ࠀ ࠁ  </p> 0x10000-0x10ffff range: 𐀀 𐀁   >>> test(utf8_bom+utf8_test, introspect=False) - =========================================================================== - In enc_test-module.html: - --------------------------------------------------------------------------- <p>abc ABC 123</p> <p>0x80-0x7ff range: €  ߾ ߿</p> <p>0x800-0xffff range: ࠀ ࠁ  </p> 0x10000-0x10ffff range: 𐀀 𐀁   >>> test("# -*- coding: utf-8 -*-\n"+utf8_test, parse=False) - =========================================================================== - In enc_test-module.html: - --------------------------------------------------------------------------- <p>abc ABC 123</p> <p>0x80-0x7ff range: €  ߾ ߿</p> <p>0x800-0xffff range: ࠀ ࠁ  </p> 0x10000-0x10ffff range: 𐀀 𐀁   >>> test(utf8_bom+"# -*- coding: utf-8 -*-\n"+utf8_test, parse=False) - =========================================================================== - In enc_test-module.html: - --------------------------------------------------------------------------- <p>abc ABC 123</p> <p>0x80-0x7ff range: €  ߾ ߿</p> <p>0x800-0xffff range: ࠀ ࠁ  </p> 0x10000-0x10ffff range: 𐀀 𐀁   >>> test(utf8_bom+utf8_test, parse=False) - =========================================================================== - In enc_test-module.html: - --------------------------------------------------------------------------- <p>abc ABC 123</p> <p>0x80-0x7ff range: €  ߾ ߿</p> <p>0x800-0xffff range: ࠀ ࠁ  </p> @@ -321,11 +250,8 @@ ... @group \xc2\x80: x ... """ ... ''') - =========================================================================== - In enc_test-module.html: - --------------------------------------------------------------------------- + <BLANKLINE> abc ABC 123 € ߿ ࠀ - --------------------------------------------------------------------------- abc ABC 123 € ߿ ࠀ >>> test('''# -*- coding: utf-8 -*- @@ -339,23 +265,13 @@ ... @except X: abc ABC 123 \xc2\x80 \xdf\xbf \xe0\xa0\x80 ... """ ... ''') - =========================================================================== - In enc_test-module.html: - --------------------------------------------------------------------------- abc ABC 123 € ߿ ࠀ - --------------------------------------------------------------------------- abc ABC 123 € ߿ ࠀ - --------------------------------------------------------------------------- abc ABC 123 € ߿ ࠀ - --------------------------------------------------------------------------- abc ABC 123 € ߿ ࠀ - --------------------------------------------------------------------------- abc ABC 123 € ߿ ࠀ - --------------------------------------------------------------------------- abc ABC 123 € ߿ ࠀ - --------------------------------------------------------------------------- abc ABC 123 € ߿ ࠀ - --------------------------------------------------------------------------- abc ABC 123 € ߿ ࠀ >>> test('''# -*- coding: utf-8 -*- @@ -369,29 +285,15 @@ ... ... z = property(doc=u"abc ABC 123 \xc2\x80 \xdf\xbf \xe0\xa0\x80") ... ''') - =========================================================================== - In enc_test-module.html: - --------------------------------------------------------------------------- abc ABC 123 € ߿ ࠀ - =========================================================================== - In enc_test.A-class.html: - --------------------------------------------------------------------------- abc ABC 123 € ߿ ࠀ - --------------------------------------------------------------------------- abc ABC 123 € ߿ ࠀ - --------------------------------------------------------------------------- abc ABC 123 € ߿ ࠀ - --------------------------------------------------------------------------- abc ABC 123 € ߿ ࠀ - --------------------------------------------------------------------------- abc ABC 123 € ߿ ࠀ - --------------------------------------------------------------------------- abc ABC 123 € ߿ ࠀ - --------------------------------------------------------------------------- abc ABC 123 € ߿ ࠀ - --------------------------------------------------------------------------- abc ABC 123 € ߿ ࠀ - --------------------------------------------------------------------------- abc ABC 123 € ߿ ࠀ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dva...@us...> - 2006-07-11 13:41:44
|
Revision: 1246 Author: dvarrazzo Date: 2006-07-11 06:41:33 -0700 (Tue, 11 Jul 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1246&view=rev Log Message: ----------- - PyGetSetDef generated attributes handled as properties. Modified Paths: -------------- trunk/epydoc/src/epydoc/docintrospecter.py trunk/epydoc/src/epydoc/docwriter/html.py Modified: trunk/epydoc/src/epydoc/docintrospecter.py =================================================================== --- trunk/epydoc/src/epydoc/docintrospecter.py 2006-07-11 13:40:17 UTC (rev 1245) +++ trunk/epydoc/src/epydoc/docintrospecter.py 2006-07-11 13:41:33 UTC (rev 1246) @@ -475,10 +475,11 @@ prop_doc.docstring = get_docstring(prop) # Record the property's access functions. - prop_doc.fget = introspect_docs(prop.fget) - prop_doc.fset = introspect_docs(prop.fset) - prop_doc.fdel = introspect_docs(prop.fdel) - + if hasattr(prop, 'fget'): + prop_doc.fget = introspect_docs(prop.fget) + prop_doc.fset = introspect_docs(prop.fset) + prop_doc.fdel = introspect_docs(prop.fdel) + return prop_doc #//////////////////////////////////////////////////////////// @@ -696,6 +697,15 @@ register_introspecter(inspect.isroutine, introspect_routine, priority=28) register_introspecter(is_property, introspect_property, priority=30) +try: + import array + attribute = type(array.array.typecode) + del array + def is_attribute(v): return isinstance(v, attribute) + register_introspecter(is_attribute, introspect_property, priority=32) +except: + pass + #//////////////////////////////////////////////////////////// # Import support #//////////////////////////////////////////////////////////// Modified: trunk/epydoc/src/epydoc/docwriter/html.py =================================================================== --- trunk/epydoc/src/epydoc/docwriter/html.py 2006-07-11 13:40:17 UTC (rev 1245) +++ trunk/epydoc/src/epydoc/docwriter/html.py 2006-07-11 13:41:33 UTC (rev 1246) @@ -1930,7 +1930,8 @@ accessors = [(name, self.property_accessor_to_html(val_doc), self.summary(val_doc)) for (name, val_doc) in [('Get', prop_doc.fget), ('Set', prop_doc.fset), - ('Delete', prop_doc.fdel)]] + ('Delete', prop_doc.fdel)] + if val_doc is not UNKNOWN ] self.write_property_details_entry(out, var_doc, descr, accessors, div_class) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dva...@us...> - 2006-07-11 13:40:29
|
Revision: 1245 Author: dvarrazzo Date: 2006-07-11 06:40:17 -0700 (Tue, 11 Jul 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1245&view=rev Log Message: ----------- - All regression tests pass Modified Paths: -------------- trunk/epydoc/src/epydoc/test/encoding.doctest Modified: trunk/epydoc/src/epydoc/test/encoding.doctest =================================================================== --- trunk/epydoc/src/epydoc/test/encoding.doctest 2006-07-08 13:07:55 UTC (rev 1244) +++ trunk/epydoc/src/epydoc/test/encoding.doctest 2006-07-11 13:40:17 UTC (rev 1245) @@ -391,6 +391,8 @@ abc ABC 123 € ߿ ࠀ --------------------------------------------------------------------------- abc ABC 123 € ߿ ࠀ + --------------------------------------------------------------------------- + abc ABC 123 € ߿ ࠀ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2006-07-08 13:08:00
|
Revision: 1244 Author: edloper Date: 2006-07-08 06:07:55 -0700 (Sat, 08 Jul 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1244&view=rev Log Message: ----------- - Define commands pysrckeyword, pysrcprompt, etc, which are used by source code colorization. Modified Paths: -------------- trunk/epydoc/src/epydoc/docwriter/latex.py Modified: trunk/epydoc/src/epydoc/docwriter/latex.py =================================================================== --- trunk/epydoc/src/epydoc/docwriter/latex.py 2006-07-05 22:54:40 UTC (rev 1243) +++ trunk/epydoc/src/epydoc/docwriter/latex.py 2006-07-08 13:07:55 UTC (rev 1244) @@ -30,6 +30,7 @@ "\\usepackage{alltt, parskip, fancyheadings, boxedminipage}", "\\usepackage{makeidx, multirow, longtable, tocbibind, amssymb}", "\\usepackage{fullpage}", + "\\usepackage[usenames]{color}", # Fix the heading position -- without this, the headings generated # by the fancyheadings package sometimes overlap the text. "\\setlength{\\headheight}{16pt}", @@ -45,6 +46,41 @@ "\\pagestyle{fancy}", "\\renewcommand{\\sectionmark}[1]{\\markboth{#1}{}}", "\\renewcommand{\\subsectionmark}[1]{\\markright{#1}}", + # Colorization for python source code + "\\definecolor{py@keywordcolour}{rgb}{1,0.45882,0}", + "\\definecolor{py@stringcolour}{rgb}{0,0.666666,0}", + "\\definecolor{py@commentcolour}{rgb}{1,0,0}", + "\\definecolor{py@ps1colour}{rgb}{0.60784,0,0}", + "\\definecolor{py@ps2colour}{rgb}{0.60784,0,1}", + "\\definecolor{py@inputcolour}{rgb}{0,0,0}", + "\\definecolor{py@outputcolour}{rgb}{0,0,1}", + "\\definecolor{py@exceptcolour}{rgb}{1,0,0}", + "\\definecolor{py@builtincolour}{rgb}{0.58039,0,0.58039}", + "\\definecolor{py@identifiercolour}{rgb}{0,0,0}", + "\\definecolor{py@linenumcolour}{rgb}{0.4,0.4,0.4}", + "\\definecolor{py@inputcolour}{rgb}{0,0,0}", + "% Prompt", + "\\newcommand{\\pysrcprompt}[1]{\\textcolor{py@ps1colour}" + "{\\small\\textbf{#1}}}", + "\\newcommand{\\pysrcmore}[1]{\\textcolor{py@ps2colour}" + "{\\small\\textbf{#1}}}", + "% Source code", + "\\newcommand{\\pysrckeyword}[1]{\\textcolor{py@keywordcolour}" + "{\\small\\textbf{#1}}}", + "\\newcommand{\\pysrcbuiltin}[1]{\\textcolor{py@builtincolour}" + "{\\small\\textbf{#1}}}", + "\\newcommand{\\pysrcstring}[1]{\\textcolor{py@stringcolour}" + "{\\small\\textbf{#1}}}", + "\\newcommand{\\pysrcother}[1]{\\small\\textbf{#1}}", + "% Comments", + "\\newcommand{\\pysrccomment}[1]{\\textcolor{py@commentcolour}" + "{\\small\\textbf{#1}}}", + "% Output", + "\\newcommand{\\pysrcoutput}[1]{\\textcolor{py@outputcolour}" + "{\\small\\textbf{#1}}}", + "% Exceptions", + "\\newcommand{\\pysrcexcept}[1]{\\textcolor{py@exceptcolour}" + "{\\small\\textbf{#1}}}", # Define new environment for displaying parameter lists. textwrap.dedent("""\ \\newenvironment{Ventry}[1]% @@ -226,7 +262,6 @@ # If we're generating hyperrefs, add the appropriate packages. if self._hyperref: - out('\\usepackage[usenames]{color}\n') out('\\definecolor{UrlColor}{rgb}{0,0.08,0.45}\n') out('\\usepackage[dvips, pagebackref, pdftitle={%s}, ' 'pdfcreator={epydoc %s}, bookmarks=true, ' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2006-07-05 22:54:43
|
Revision: 1243 Author: edloper Date: 2006-07-05 15:54:40 -0700 (Wed, 05 Jul 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1243&view=rev Log Message: ----------- - Fixed a unicode bug (if the url of a link was unicode, and the source file contained non-ascii characters, then it would fail.) Modified Paths: -------------- trunk/epydoc/src/epydoc/docwriter/html_colorize.py Modified: trunk/epydoc/src/epydoc/docwriter/html_colorize.py =================================================================== --- trunk/epydoc/src/epydoc/docwriter/html_colorize.py 2006-07-05 20:49:46 UTC (rev 1242) +++ trunk/epydoc/src/epydoc/docwriter/html_colorize.py 2006-07-05 22:54:40 UTC (rev 1243) @@ -778,7 +778,10 @@ self.cur_line = [] _next_uid = 0 - + + # [xx] note -- this works with byte strings, not unicode strings! + # I may change it to use unicode eventually, but when I do it + # needs to be changed all at once. def handle_line(self, line): """ Render a single logical line from the module, and write the @@ -809,6 +812,8 @@ # Loop through each token, and colorize it appropriately. for i, (toktype, toktext) in enumerate(line): + assert type(s) is str # *not* unicode! + # For each token, determine its css class and whether it # should link to a url. css_class = None @@ -947,15 +952,22 @@ (uid, css_class_html, tooltip_html, css_class_html, onclick)) elif url: + if isinstance(url, unicode): + url = url.encode('ascii', 'xmlcharrefreplace') s += ('<a%s%s href="%s">' % (tooltip_html, css_class_html, url)) + assert type(s) is str # *not* unicode! elif css_class_html or tooltip_html: s += '<span%s%s>' % (tooltip_html, css_class_html) if i == len(line)-1: s += ' </span>' # Closes <span class="py-line"> s += cgi.escape(toktext) else: - s += self.add_line_numbers(cgi.escape(toktext), css_class) + try: + s += self.add_line_numbers(cgi.escape(toktext), css_class) + except Exception, e: + print (toktext, css_class, toktext.encode('ascii')) + raise if onclick: s += "</a></span>" if url: s += '</a>' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2006-07-05 20:49:49
|
Revision: 1242 Author: edloper Date: 2006-07-05 13:49:46 -0700 (Wed, 05 Jul 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1242&view=rev Log Message: ----------- HTML output: - put module & class trees on separate pages. - put identifier index, term index, & bug index on separate pgaes. - various CSS changes/markup changes - Improved tree & index pages - Misc code clean-up - Doctest colorization moved to epydoc/markup/doctest.py - Various CSS changes Modified Paths: -------------- trunk/epydoc/src/epydoc/docwriter/html_css.py Modified: trunk/epydoc/src/epydoc/docwriter/html_css.py =================================================================== --- trunk/epydoc/src/epydoc/docwriter/html_css.py 2006-07-05 20:49:30 UTC (rev 1241) +++ trunk/epydoc/src/epydoc/docwriter/html_css.py 2006-07-05 20:49:46 UTC (rev 1242) @@ -38,397 +38,271 @@ # Also, in principle I'm mangling classes, but it looks like I'm # failing. # -# Should all epydoc css classes start with epydoc-? -# -# Base stylesheet -- just the layout details (no color) -_LAYOUT = """ - -/* Tables */ -table.help { margin-left: auto; margin-right: auto; } -table.summary { border-collapse: collapse; - border-width: 1px; border-style: solid; } -table.details { border-collapse: collapse; - border-width: 1px; border-style: solid; - margin: .2em 0 0 0; } -table.index { border-collapse: collapse; - border-width: 1px; border-style: solid; } -td.summary { border-width: 1px; border-style: solid; } -td.details { border-width: 1px; border-style: solid; } -td.index { border-width: 0px; } -th.group { text-align: left; font-size: 115%; font-style: italic; - border-width: 1px; border-style: solid; } - -/* Documentation page titles */ -h2.module { margin-top: 0.2em; } -h2.class { margin-top: 0.2em; } -h2.type { margin-top: 0.2em; } -h2.py-src { margin-top: 0.2em; } -h2.index { margin-top: 0.2em; margin-bottom: 0; } - -/* Headings */ -h1.help { text-align: center; } -h1.heading { font-size: +140%; font-style: italic; - font-weight: bold; } -h2.heading { font-size: +125%; font-style: italic; - font-weight: bold; } -h3.heading { font-size: +110%; font-style: italic; - font-weight: normal; } -h1.tocheading { text-align: center; font-size: 105%; margin: 0; - font-weight: bold; padding: 0; } -h2.tocheading { font-size: 100%; margin: 0.5em 0 0 -0.3em; - font-weight: bold; } -h3.summary, h3.details, h3.index /* used in table headers */ - { font-size: 120%; margin: 0; } - -/* Table of contents */ -p.toc { margin: 0; padding: 0; } - -/* Base tree */ -pre.base-tree { font-size: 80%; margin: 0; } - -/* Summary Sections */ -p.varlist { padding: 0 0 0 7em; text-indent: -7em; - margin: 0; } -.varlist-header { font-weight: bold; } -p.imports { padding: 0 0 0 7em; text-indent: -7em; } -.imports-header { font-weight: bold; } - -/* Function signatures */ -.sig { font-weight: bold; } - -/* Doctest blocks */ -.py-prompt { font-weight: bold;} -pre.doctestblock { padding: .5em; margin: 1em; - border-width: 1px; border-style: solid; } -table pre.doctestblock - { padding: .5em; margin: 1em; - border-width: 1px; border-style: solid; } - -/* Variable values */ -pre.variable { padding: .5em; margin: 0; - border-width: 1px; border-style: solid; } - -/* Navigation bar */ -table.navbar { border-width: 2px; border-style: groove; } -.nomargin { margin: 0; } - -/* This is used in <div> sections containing tables of private -values, to make them flow more seamlessly with the table that -comes before them. */ -.continue { border-top: 0; } - -/* Links */ -a.navbar { text-decoration: none; } - -/* Source Code Listings */ -pre.py-src { border: 2px solid black; } -div.highlight-hdr { border-top: 2px solid black; - border-bottom: 1px solid black; } -div.highlight { border-bottom: 2px solid black; } -a.pysrc-toggle { text-decoration: none; } -.py-line { border-left: 2px solid black; margin-left: .2em; - padding-left: .4em; } -.lineno { font-style: italic; font-size: 90%; - padding-left: .5em; } -/*a.py-name { text-decoration: none; }*/ - -/* Graphs */ -.graph-without-title { border: none; } -.graph-with-title { border: 1px solid black; } -.graph-title { font-weight: bold; } - -/* Lists */ -ul { margin-top: 0; } - -/* Misc. */ -.footer { font-size: 85%; } -.header { font-size: 85%; } -.breadcrumbs { font-size: 85%; font-weight: bold; } -.options { font-size: 70%; } -.rtype, .ptype, .vtype - { font-size: 85%; } -dt { font-weight: bold; } -.small { font-size: 85%; } - -h2 span.codelink { font-size: 58%; font-weight: normal; } -span.codelink { font-size: 85%; font-weight; normal; } -""" - # Black on white, with blue highlights. This is similar to how # javadoc looks. -_WHITE = _LAYOUT + """ -/* Body color */ -body { background: #ffffff; color: #000000; } - -/* Tables */ -table.summary { background: #e8f0f8; color: #000000; - border-color: #608090; } -table.details { background: #e8f0f8; color: #000000; - border-color: #608090; } -table.index { background: #e8f0f8; color: #000000; - border-color: #608090; } -tr.summary { background: #70b0ff; color: #000000; - border-color: #608090; } -tr.details { background: #70b0ff; color: #000000; - border-color: #608090; } -tr.index { background: #70b0ff; color: #000000; } -th.group { background: #c0e0f8; color: #000000; } +TEMPLATE = """ -/* Function signatures */ -.sig { background: transparent; color: #000000; } -.sig-name { background: transparent; color: #006080; } -.sig-arg, .sig-kwarg, .sig-vararg - { background: transparent; color: #008060; } -.sig-default { background: transparent; color: #602000; } -.summary-sig { background: transparent; color: #000000; } -.summary-sig-name { background: transparent; color: #204080; } -.summary-sig-arg, .summary-sig-kwarg, .summary-sig-vararg - { background: transparent; color: #008060; } +/* Epydoc CSS Stylesheet + * + * This stylesheet can be used to customize the appearance of epydoc's + * HTML output. + * + */ -/* Souce code listings & doctest blocks */ -.py-src { background: transparent; color: #000000; } -.py-prompt { background: transparent; color: #005050; } -.py-string { background: transparent; color: #006030; } -.py-comment { background: transparent; color: #003060; } -.py-keyword { background: transparent; color: #600000; } -.py-output { background: transparent; color: #404040; } -.py-name { background: transparent; color: #000050; } -.py-name:link { background: transparent; color: #000050; } -.py-name:visited { background: transparent; color: #000050; } -.py-number { background: transparent; color: #005000; } -.py-def-name { background: transparent; color: #000060; - font-weight: bold; } -.py-base-class { background: transparent; color: #000060; } -.py-param { background: transparent; color: #000060; } -.py-docstring { background: transparent; color: #006030; } -.py-decorator { background: transparent; color: #804020; } - -pre.doctestblock { background: #f4faff; color: #000000; - border-color: #708890; } -table pre.doctestblock - { background: #dce4ec; color: #000000; - border-color: #708890; } -div.py-src { background: #f0f0f0; } -div.highlight-hdr { background: #d8e8e8; } -div.highlight { background: #d0e0e0; } - - -/* Variable values */ -pre.variable { background: #dce4ec; color: #000000; - border-color: #708890; } -.variable-linewrap { background: transparent; color: #604000; } -.variable-ellipsis { background: transparent; color: #604000; } -.variable-quote { background: transparent; color: #604000; } -.re { background: transparent; color: #000000; } -.re-char { background: transparent; color: #006030; } -.re-op { background: transparent; color: #600000; } -.re-group { background: transparent; color: #003060; } -.re-ref { background: transparent; color: #404040; } - -/* Navigation bar */ -table.navbar { background: #a0c0ff; color: #0000ff; - border-color: #c0d0d0; } -th.navbar { background: #a0c0ff; color: #0000ff; } -th.navselect { background: #70b0ff; color: #000000; } - -/* Links */ -a:link { background: transparent; color: #0000ff; } -a:visited { background: transparent; color: #204080; } -a.navbar:link { background: transparent; color: #0000ff; } -a.navbar:visited { background: transparent; color: #204080; } -""" - -# Black on steel blue (old version) -_OLD_BLUE = _LAYOUT + """ -/* Body color */ -body { background: #88a0a8; color: #000000; } +/* Default Colors & Styles + * - Set the default foreground & background color with 'body'; and + * link colors with 'a:link' and 'a:visited'. + * - Use bold for decision list terms. + * - The heading styles defined here are used for headings *within* + * docstring descriptions. All headings used by epydoc itself use + * either class='epydoc' or class='toc' (CSS styles for both + * defined below). + */ +body { background: #ffffff; color: #000000; } +a:link { color: #0000ff; } +a:visited { color: #204080; } +dt { font-weight: bold; } +h1 { font-size: +140%; font-style: italic; + font-weight: bold; } +h2 { font-size: +125%; font-style: italic; + font-weight: bold; } +h3 { font-size: +110%; font-style: italic; + font-weight: normal; } -/* Tables */ -table.summary, table.details, table.index - { background: #a8c0c8; color: #000000; } -tr.summary { background: #c0e0e0; color: #000000; } -tr.details, tr.index - { background: #c0e0e0; color: #000000; } -th.group { background: #bad8e0; color: #000000; } +/* Page Header & Footer + * - The standard page header consists of a navigation bar (with + * pointers to standard pages such as 'home' and 'trees'); a + * breadcrumbs list, which can be used to navigate to containing + * classes or modules; options links, to show/hide private + * variables and to show/hide frames; and a page title (using + * <h1>). The page title may be followed by a link to the + * corresponding source code (using 'span.codelink'). + * - The footer consists of a navigation bar, a timestamp, and a + * pointer to epydoc's homepage. + */ +h1.epydoc { margin: 0; font-size: +140%; font-weight: bold; } +h2.epydoc { font-size: +130%; font-weight: bold; } +h3.epydoc { font-size: +115%; font-weight: bold; } +table.navbar { background: #a0c0ff; color: #000000; + border: 2px groove #c0d0d0; } +table.navbar table { color: #000000; } +th.navbar-select { background: #70b0ff; + color: #000000; } +table.navbar a { text-decoration: none; } +table.navbar a:link { color: #0000ff; } +table.navbar a:visited { color: #204080; } +span.breadcrumbs { font-size: 85%; font-weight: bold; } +span.options { font-size: 70%; } +span.codelink { font-size: 85%; } +td.footer { font-size: 85%; } -/* Documentation page titles */ -h2.module { margin-top: 0.2em; } -h2.class { margin-top: 0.2em ; } - -/* Headings */ -h1.heading { background: transparent; color: #002040; } -h2.heading { background: transparent; color: #002040; } -h3.heading { background: transparent; color: #002040; } +/* Table Headers + * - Each summary table and details section begins with a 'header' + * row. This row contains a section title (marked by + * 'span.table-header') as well as a show/hide private link + * (marked by 'span.options', defined above). + * - Summary tables that contain user-defined groups mark those + * groups using 'group header' rows. + */ +td.table-header { background: #70b0ff; color: #000000; + border: 1px solid #608090; } +td.table-header table { color: #000000; } +td.table-header table a:link { color: #0000ff; } +td.table-header table a:visited { color: #204080; } +span.table-header { font-size: 120%; font-weight: bold; } +th.group-header { background: #c0e0f8; color: #000000; + text-align: left; font-style: italic; + font-size: 115%; + border: 1px solid #608090; } -/* Details Sections */ -table.func-details { background: #a8c0c8; color: #000000; - border-color: #c0d0d0; } -h3.func-detail { background: transparent; color: #000000; } -table.var-details { background: #a8c0c8; color: #000000; - border-color: #c0d0d0; } -h3.var-details { background: transparent; color: #000000; } -table.prop-details { background: #a8c0c8; color: #000000; - border-color: #c0d0d0; } -h3.prop-details { background: transparent; color: #000000; } +/* Summary Tables (functions, variables, etc) + * - Each object is described by a single row of the table with + * two cells. The left cell gives the object's type, and is + * marked with 'code.summary-type'. The right cell gives the + * object's name and a summary description. + * - CSS styles for the table's header and group headers are + * defined above, under 'Table Headers' + */ +table.summary { border-collapse: collapse; + background: #e8f0f8; color: #000000; + border: 1px solid #608090; } +td.summary { border: 1px solid #608090; } +code.summary-type { font-size: 85%; } +table.summary a:link { color: #0000ff; } +table.summary a:visited { color: #204080; } -/* Function signatures */ -.sig { background: transparent; color: #000000; } -.sig-name { background: transparent; color: #006080; } -.sig-arg, .sig-kwarg, .sig-vararg - { background: transparent; color: #008060; } -.sig-default { background: transparent; color: #602000; } -.summary-sig { background: transparent; color: #000000; } -.summary-sig-name { background: transparent; color: #104060; } -.summary-sig-arg, .summary-sig-kwarg, .summary-sig-vararg - { background: transparent; color: #008060; } -/* Souce code listings & doctest blocks */ -.py-src { background: transparent; color: #000000; } -.py-prompt { background: transparent; color: #005050; } -.py-string { background: transparent; color: #006030; } -.py-comment { background: transparent; color: #003060; } -.py-keyword { background: transparent; color: #600000; } -.py-output { background: transparent; color: #404040; } -.py-name { background: transparent; color: #000050; } -.py-name:link { background: transparent; color: #000050; } -.py-name:visited { background: transparent; color: #000050; } -.py-number { background: transparent; color: #005000; } -.py-def-name { background: transparent; color: #000060; - font-weight: bold; } -.py-base-class { background: transparent; color: #000060; } -.py-param { background: transparent; color: #000060; } -.py-docstring { background: transparent; color: #006030; } -.py-decorator { background: transparent; color: #804020; } +/* Details Tables (functions, variables, etc) + * - Each object is described in its own single-celled table. + * - A single-row summary table w/ table-header is used as + * a header for each details section (CSS style for table-header + * is defined above, under 'Table Headers'). + */ +table.details { border-collapse: collapse; + background: #e8f0f8; color: #000000; + border: 1px solid #608090; + margin: .2em 0 0 0; } +table.details table { color: #000000; } +table.details a:link { color: #0000ff; } +table.details a:visited { color: #204080; } -pre.doctestblock { background: #90a8b0; color: #000000; } - border-color: #708890; } -table pre.doctestblock - { background: #b0c8d0; color: #000000; - border-color: #708890; } -div.py-src { background: #f0f0f0; } -div.highlight-hdr { background: #d8e8e8; } -div.highlight { background: #d0e0e0; } - -/* Variable values */ -pre.variable { background: #b0c8d0; color: #000000; - border-color: #708890; } -.variable-linewrap { background: transparent; color: #604000; } -.variable-ellipsis { background: transparent; color: #604000; } -.variable-quote { background: transparent; color: #604000; } -.re { background: transparent; color: #000000; } -.re-char { background: transparent; color: #006030; } -.re-op { background: transparent; color: #600000; } -.re-group { background: transparent; color: #003060; } -.re-ref { background: transparent; color: #404040; } - -/* Navigation bar */ -table.navbar { background: #607880; color: #b8d0d0; - border-color: #c0d0d0; } -th.navbar { background: #607880; color: #b8d0d0; } -th.navselect { background: #88a0a8; color: #000000; } - -/* Links */ -a:link { background: transparent; color: #104060; } -a:visited { background: transparent; color: #082840; } -a.navbar:link { background: transparent; color: #b8d0d0; } -a.navbar:visited { background: transparent; color: #b8d0d0; } -""" +/* Index tables (identifier index, term index, etc) + * - link-index is used for indices containing lists of links + * (namely, the identifier index & term index). + * - index-where is used in link indices for the text indicating + * the container/source for each link. + * - metadata-index is used for indices containing metadata + * extracted from fields (namely, the bug index & todo index). + */ +table.link-index { border-collapse: collapse; + background: #e8f0f8; color: #000000; + border: 1px solid #608090; } +td.link-index { border-width: 0px; } +table.link-index a:link { color: #0000ff; } +table.link-index a:visited { color: #204080; } +span.index-where { font-size: 70%; } +table.metadata-index { border-collapse: collapse; + background: #e8f0f8; color: #000000; + border: 1px solid #608090; + margin: .2em 0 0 0; } +td.metadata-index { border-width: 1px; border-style: solid; } +table.metadata-index a:link { color: #0000ff; } +table.metadata-index a:visited { color: #204080; } -# Black on steel blue (new version: higher contrast) -_BLUE = _LAYOUT + """ -/* Body color */ -body { background: #b0c8d0; color: #000000; } - -/* Tables */ -table.summary, table.details, table.index - { background: #c8e0e8; color: #000000; } -tr.summary { background: #dcf4fc; color: #000000; } -tr.details, tr.index - { background: #dcf4fc; color: #000000; } -th.group { background: #bad8e0; color: #000000; } +/* Function signatures + * - sig* is used for the signature in the details section. + * - .summary-sig* is used for the signature in the summary + * table, and when listing property accessor functions. + * */ +.sig-name { color: #006080; } +.sig-arg { color: #008060; } +.sig-default { color: #602000; } +.summary-sig { font-family: monospace; } +.summary-sig-name { color: #006080; font-weight: bold; } +a.summary-sig-name:link { color: #006080; font-weight: bold; } +a.summary-sig-name:visited { color: #006080; font-weight: bold; } +.summary-sig-arg { color: #006040; } +.summary-sig-default { color: #501800; } -/* Documentation page titles */ -h2.module { margin-top: 0.2em; } -h2.class { margin-top: 0.2em ; } - -/* Headings */ -h1.heading { background: transparent; color: #002060; } -h2.heading { background: transparent; color: #002060; } -h3.heading { background: transparent; color: #002060; } +/* Variable values + * - In the 'variable details' sections, each varaible's value is + * listed in a 'pre.variable' box. The width of this box is + * restricted to 80 chars; if the value's repr is longer than + * this it will be wrapped, using a backslash marked with + * class 'variable-linewrap'. If the value's repr is longer + * than 3 lines, the rest will be ellided; and an ellipsis + * marker ('...' marked with 'variable-ellipsis') will be used. + * - If the value is a string, its quote marks will be marked + * with 'variable-quote'. + * - If the variable is a regexp, it is syntax-highlighted using + * the re* CSS classes. + */ +pre.variable { padding: .5em; margin: 0; + background: #dce4ec; color: #000000; + border: 1px solid #708890; } +.variable-linewrap { color: #604000; font-weight: bold; } +.variable-ellipsis { color: #604000; font-weight; bold; } +.variable-quote { color: #604000; font-weight: bold; } +.re { color: #000000; } +.re-char { color: #006030; } +.re-op { color: #600000; } +.re-group { color: #003060; } +.re-ref { color: #404040; } -/* Details Sections */ -table.func-details { background: #c8e0e8; color: #000000; - border-color: #c0d0d0; } -h3.func-detail { background: transparent; color: #000000; } -table.var-details { background: #c8e0e8; color: #000000; - border-color: #ffffff; } -h3.var-details { background: transparent; color: #000000; } -table.prop-details { background: #c8e0e8; color: #000000; - border-color: #ffffff; } -h3.prop-details { background: transparent; color: #000000; } +/* Base tree + * - Used by class pages to display the base class hierarchy. + */ +pre.base-tree { font-size: 80%; margin: 0; } -/* Function signatures */ -.sig { background: transparent; color: #000000; } -.sig-name { background: transparent; color: #006080; } -.sig-arg, .sig-kwarg, .sig-vararg - { background: transparent; color: #008060; } -.sig-default { background: transparent; color: #602000; } -.summary-sig { background: transparent; color: #000000; } -.summary-sig-name { background: transparent; color: #082840; } -.summary-sig-arg, .summary-sig-kwarg, .summary-sig-vararg - { background: transparent; color: #008060; } +/* Frames-based table of contents headers + * - Consists of two frames: one for selecting modules; and + * the other listing the contents of the selected module. + * - h1.toc is used for each frame's heading + * - h2.toc is used for subheadings within each frame. + */ +h1.toc { text-align: center; font-size: 105%; + margin: 0; font-weight: bold; + padding: 0; } +h2.toc { font-size: 100%; font-weight: bold; + margin: 0.5em 0 0 -0.3em; } -/* Souce code listings & doctest blocks */ -.py-src { background: transparent; color: #000000; } -.py-prompt { background: transparent; color: #006070; } -.py-string { background: transparent; color: #007050; } -.py-comment { background: transparent; color: #004080; } -.py-keyword { background: transparent; color: #800000; } -.py-output { background: transparent; color: #484848; } -.py-name { background: transparent; color: #000050; } -.py-name:link { background: transparent; color: #000050; } -.py-name:visited { background: transparent; color: #000050; } -.py-number { background: transparent; color: #005000; } -.py-def-name { background: transparent; color: #000060; - font-weight: bold; } -.py-base-class { background: transparent; color: #000060; } -.py-param { background: transparent; color: #000060; } -.py-docstring { background: transparent; color: #006030; } -.py-decorator { background: transparent; color: #804020; } +/* Syntax Highlighting for Source Code + * - doctest examples are displayed in a 'pre.py-doctest' block. + * If the example is in a details table entry, then it will use + * the colors specified by the 'table pre.py-doctest' line. + * - Source code listings are displayed in a 'pre.py-src' block. + * Each line is marked with 'span.py-line' (used to draw a line + * down the left margin, separating the code from the line + * numbers). Line numbers are displayed with 'span.py-lineno'. + * The expand/collapse block toggle button is displayed with + * 'a.py-toggle' (Note: the CSS style for 'a.py-toggle' should not + * modify the font size of the text.) + * - If a source code page is opened with an anchor, then the + * corresponding code block will be highlighted. The code + * block's header is highlighted with 'py-highlight-hdr'; and + * the code block's body is highlighted with 'py-highlight'. + * - The remaining py-* classes are used to perform syntax + * highlighting (py-string for string literals, py-name for names, + * etc.) + */ +pre.py-doctest { padding: .5em; margin: 1em; + background: #e8f0f8; color: #000000; + border: 1px solid #708890; } +table pre.py-doctest { background: #dce4ec; + color: #000000; } +pre.py-src { border: 2px solid #000000; + background: #f0f0f0; color: #000000; } +span.py-line { border-left: 2px solid #000000; + margin-left: .2em; padding-left: .4em; } +span.py-lineno { font-style: italic; font-size: 90%; + padding-left: .5em; } +a.py-toggle { text-decoration: none; } +div.py-highlight-hdr { border-top: 2px solid #000000; + border-bottom: 2px solid #000000; + background: #d8e8e8; } +div.py-highlight { border-bottom: 2px solid #000000; + background: #d0e0e0; } +.py-prompt { color: #005050; font-weight: bold;} +.py-string { color: #006030; } +.py-comment { color: #003060; } +.py-keyword { color: #600000; } +.py-output { color: #404040; } +.py-name { color: #000050; } +.py-name:link { color: #000050; } +.py-name:visited { color: #000050; } +.py-number { color: #005000; } +.py-def-name { color: #000060; font-weight: bold; } +.py-base-class { color: #000060; } +.py-param { color: #000060; } +.py-docstring { color: #006030; } +.py-decorator { color: #804020; } +/* Use this if you don't want links to names underlined: */ +/*a.py-name { text-decoration: none; }*/ -pre.doctestblock { background: #c8e0e8; color: #000000; - border-color: #708890; } -table pre.doctestblock - { background: #c0d8e0; color: #000000; - border-color: #708890; } -div.py-src { background: #f0f0f0; } -div.highlight-hdr { background: #d8e8e8; } -div.highlight { background: #d0e0e0; } - -/* Variable values */ -pre.variable { background: #c0d8e0; color: #000000; - border-color: #708890; } -.variable-linewrap { background: transparent; color: #705000; } -.variable-ellipsis { background: transparent; color: #705000; } -.variable-quote { background: transparent; color: #705000; } -.re { background: transparent; color: #000000; } -.re-char { background: transparent; color: #007050; } -.re-op { background: transparent; color: #800000; } -.re-group { background: transparent; color: #004080; } -.re-ref { background: transparent; color: #484848; } - -/* Navigation bar */ -table.navbar { background: #688088; color: #d8f0f0; - border-color: #c0d0d0; } -th.navbar { background: #688088; color: #d8f0f0; } -th.navselect { background: #88a0a8; color: #000000; } - -/* Links */ -a:link { background: transparent; color: #104060; } -a:visited { background: transparent; color: #082840; } -a.navbar:link { background: transparent; color: #d8f0f0; } -a.navbar:visited { background: transparent; color: #d8f0f0; } +/* Graphs & Diagrams + * - These CSS styles are used for graphs & diagrams generated using + * Graphviz dot. 'img.graph-without-title' is used for bare + * diagrams (to remove the border created by making the image + * clickable). + */ +img.graph-without-title { border: none; } +img.graph-with-title { border: 1px solid #000000; } +span.graph-title { font-weight: bold; } +span.graph-caption { } + +/* General-purpose classes + * - 'p.indent-wrapped-lines' defines a paragraph whose first line + * is not indented, but whose subsequent lines are. + * - The 'nomargin-top' class is used to remove the top margin (e.g. + * from lists). The 'nomargin' class is used to remove both the + * top and bottom margin (but not the left or right margin -- + * for lists, that would cause the bullets to disappear.) + */ +p.indent-wrapped-lines { padding: 0 0 0 7em; text-indent: -7em; + margin: 0; } +.nomargin-top { margin-top: 0; } +.nomargin { margin-top: 0; margin-bottom: 0; } """ ############################################################ @@ -440,6 +314,11 @@ _COLOR_RE = re.compile(r'#(..)(..)(..)') +def _set_colors(template, *dicts): + colors = dicts[0].copy() + for d in dicts[1:]: colors.update(d) + return re.sub(r'\$(\w+)', lambda m:colors[m.group(1)], template) + def _rv(match): """ Given a regexp match for a color, return the reverse-video version @@ -450,15 +329,125 @@ @return: The reverse-video color. @rtype: C{string} """ - str = '#' - for color in match.groups(): - str += '%02x' % (255-int(color, 16)) - return str + rgb = [int(grp, 16) for grp in match.groups()] + return '#' + ''.join(['%02x' % (255-c) for c in rgb]) -# Black-on-green -_OLD_GREEN = _COLOR_RE.sub(r'#\1\3\2', _OLD_BLUE) -_GREEN = _COLOR_RE.sub(r'#\1\3\2', _BLUE) +def _darken_darks(match): + rgb = [int(grp, 16) for grp in match.groups()] + return '#' + ''.join(['%02x' % (((c/255.)**2) * 255) for c in rgb]) +_WHITE_COLORS = dict( + # Defaults: + body_bg = '#ffffff', + body_fg = '#000000', + body_link = '#0000ff', + body_visited_link = '#204080', + # Navigation bar: + navbar_bg = '#a0c0ff', + navbar_fg = '#000000', + navbar_border = '2px groove #c0d0d0', + navbar_select_bg = '#70b0ff', + navbar_select_fg = '#000000', + navbar_link = '#0000ff', + navbar_visited_link = '#204080', + # Tables (summary tables, details tables, indices): + table_bg = '#e8f0f8', + table_fg = '#000000', + table_link = '#0000ff', + table_visited_link = '#204080', + table_border = '1px solid #608090', + table_hdr_bg = '#70b0ff', + table_hdr_fg = '#000000', + table_hdr_link = '#0000ff', + table_hdr_visited_link = '#204080', + group_hdr_bg = '#c0e0f8', + group_hdr_fg = '#000000', + # Function signatures: + sig_name = '#006080', + sig_arg = '#008060', + sig_default = '#602000', + summary_sig_name = '#006080', + summary_sig_arg = '#006040', + summary_sig_default = '#501800', + # Variable values: + variable_bg = '#dce4ec', + variable_fg = '#000000', + variable_border = '1px solid #708890', + variable_linewrap = '#604000', + variable_ellipsis = '#604000', + variable_quote = '#604000', + re = '#000000', + re_char = '#006030', + re_op = '#600000', + re_group = '#003060', + re_ref = '#404040', + # Python source code: + doctest_bg = '#e8f0f8', + doctest_fg = '#000000', + doctest_border = '1px solid #708890', + doctest_in_table_bg = '#dce4ec', + doctest_in_table_fg = '#000000', + pysrc_border = '2px solid #000000', + pysrc_sep_border = '2px solid #000000', + pysrc_bg = '#f0f0f0', + pysrc_fg = '#000000', + pysrc_highlight_hdr_bg = '#d8e8e8', + pysrc_highlight_bg = '#d0e0e0', + py_prompt = '#005050', + py_string = '#006030', + py_comment = '#003060', + py_keyword = '#600000', + py_output = '#404040', + py_name = '#000050', + py_number = '#005000', + py_def_name = '#000060', + py_base_class = '#000060', + py_param = '#000060', + py_docstring = '#006030', + py_decorator = '#804020', + # Graphs + graph_border = '1px solid #000000', + ) + +_BLUE_COLORS = _WHITE_COLORS.copy() +_BLUE_COLORS.update(dict( + # Body: white text on a dark blue background + body_bg = '#000070', + body_fg = '#ffffff', + body_link = '#ffffff', + body_visited_link = '#d0d0ff', + # Tables: cyan headers, black on white bodies + table_bg = '#ffffff', + table_fg = '#000000', + table_hdr_bg = '#70b0ff', + table_hdr_fg = '#000000', + table_hdr_link = '#000000', + table_hdr_visited_link = '#000000', + table_border = '1px solid #000000', + # Navigation bar: blue w/ cyan selection + navbar_bg = '#0000ff', + navbar_fg = '#ffffff', + navbar_link = '#ffffff', + navbar_visited_link = '#ffffff', + navbar_select_bg = '#70b0ff', + navbar_select_fg = '#000000', + navbar_border = '1px solid #70b0ff', + # Variable values & doctest blocks: cyan + variable_bg = '#c0e0f8', + variable_fg = '#000000', + doctest_bg = '#c0e0f8', + doctest_fg = '#000000', + doctest_in_table_bg = '#c0e0f8', + doctest_in_table_fg = '#000000', + )) + +_WHITE = _set_colors(TEMPLATE, _WHITE_COLORS) +_BLUE = _set_colors(TEMPLATE, _BLUE_COLORS) +_WHITE = _BLUE + + # Black-on-green +_GREEN = _COLOR_RE.sub(_darken_darks, _COLOR_RE.sub(r'#\1\3\2', _BLUE)) + # White-on-black, with blue highlights. _BLACK = _COLOR_RE.sub(r'#\3\2\1', _COLOR_RE.sub(_rv, _WHITE)) @@ -469,7 +458,6 @@ ## Stylesheet table ############################################################ -# Leave _OLD_GREEN and _OLD_BLUE out for now. STYLESHEETS = { 'white': (_WHITE, "Black on white, with blue highlights"), 'blue': (_BLUE, "Black on steel blue"), @@ -477,5 +465,5 @@ 'black': (_BLACK, "White on black, with blue highlights"), 'grayscale': (_GRAYSCALE, "Grayscale black on white"), 'default': (_WHITE, "Default stylesheet (=white)"), - 'none': (_LAYOUT, "A base stylesheet (no color modifications)"), +# 'none': (_LAYOUT, "A base stylesheet (no color modifications)"), } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2006-07-05 20:49:35
|
Revision: 1241 Author: edloper Date: 2006-07-05 13:49:30 -0700 (Wed, 05 Jul 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1241&view=rev Log Message: ----------- HTML output: - put module & class trees on separate pages. - put identifier index, term index, & bug index on separate pgaes. - various CSS changes/markup changes - Improved tree & index pages - Misc code clean-up - Doctest colorization moved to epydoc/markup/doctest.py - Various CSS changes Modified Paths: -------------- trunk/epydoc/src/epydoc/docwriter/html_colorize.py Modified: trunk/epydoc/src/epydoc/docwriter/html_colorize.py =================================================================== --- trunk/epydoc/src/epydoc/docwriter/html_colorize.py 2006-07-05 20:49:23 UTC (rev 1240) +++ trunk/epydoc/src/epydoc/docwriter/html_colorize.py 2006-07-05 20:49:30 UTC (rev 1241) @@ -302,94 +302,6 @@ return u''.join(result) ###################################################################### -## Doctest block colorizer -###################################################################### - -# Regular expressions for colorize_doctestblock -_KEYWORDS = ["del", "from", "lambda", "return", "and", "or", "is", - "global", "not", "try", "break", "else", "if", "elif", - "while", "class", "except", "import", "pass", "raise", - "continue", "finally", "in", "print", "def", "for"] -_KEYWORD = '|'.join([r'(\b%s\b)' % _KW for _KW in _KEYWORDS]) -_STRING = '|'.join([r'("""("""|.*?((?!").)"""))', r'("("|.*?((?!").)"))', - r"('''('''|.*?[^\\']'''))", r"('('|.*?[^\\']'))"]) -_STRING = _STRING.replace('"', '"') # Careful with this! -_COMMENT = '(#.*?$)' -_PROMPT = r'(^\s*(>>>|\.\.\.)(\s|$))' - -_PROMPT_RE = re.compile(_PROMPT, re.MULTILINE | re.DOTALL) -'''The regular expression used to find Python prompts (">>>" and -"...") in doctest blocks.''' - -_DOCTEST_RE = re.compile('|'.join([_STRING, _COMMENT, _KEYWORD]), - re.MULTILINE | re.DOTALL) -'''The regular expression used by L{_doctest_sub} to colorize doctest -blocks.''' - -del _KEYWORDS, _KEYWORD, _STRING, _COMMENT, _PROMPT, _KW - -def colorize_doctestblock(str): - """ - @return: The HTML code for a colorized version of a given doctest - block. In particular, this identifies spans with the - following css classes: - - X{py-src}: The Python source code. - - X{py-prompt}: The ">>>" and "..." prompts. - - X{py-string}: Strings in the Python source code. - - X{py-comment}: Comments in the Python source code. - - X{py-keyword}: Keywords in the Python source code. - - X{py-output}: Python's output (lines without a prompt). - The string that is passed to colorize_doctest should already - have HTML characters escaped (e.g., C{">"} should be encoded - as C{">"}). - @type str: C{string} - @param str: The contents of the doctest block to be colorized. - @rtype: C{string} - """ - pysrc = pyout = '' - outstr = '' - for line in str.split('\n')+['\n']: - if _PROMPT_RE.match(line): - if pyout: - outstr += ('<span class="py-output">%s</span>\n\n' % - pyout.strip()) - pyout = '' - pysrc += line+'\n' - else: - if pysrc: - # Prompt over-rides other colors (incl string) - pysrc = _DOCTEST_RE.sub(_doctest_sub, pysrc) - pysrc = _PROMPT_RE.sub(r'<span class="py-prompt">'+ - r'\1</span>', pysrc) - outstr += ('<span class="py-src">%s</span>\n' - % pysrc.strip()) - pysrc = '' - pyout += line+'\n' - if pyout.strip(): - outstr += ('<span class="py-output">%s</span>\n' % - pyout.strip()) - return outstr.strip() - -def _doctest_sub(match): - """ - This helper function is used by L{colorize_doctestblock} to - add colorization to matching expressions. It is called by - C{_DOCTEST_RE.sub} with an expression that matches - C{_DOCTEST_RE}. - - @return: The HTML code for the colorized expression. - @rtype: C{string} - @see: L{_DOCTEST_RE} - """ - str = match.group() - if str[:1] == "'" or str[:6] == '"': - return '<span class="py-string">%s</span>' % str - elif str[:1] in '#': - return '<span class="py-comment">%s</span>' % str - else: - return '<span class="py-keyword">%s</span>' % str - -###################################################################### ## Python source colorizer ###################################################################### """ @@ -429,7 +341,7 @@ var indent = elt.indent; var pad = elt.pad; - var s = "<span class=\'lineno\'>"; + var s = "<span class=\'py-lineno\'>"; for (var i=0; i<pad.length; i++) { s += " " } s += "</span>"; s += " <span class=\'py-line\'>"; @@ -449,11 +361,11 @@ } function highlight(id) { var elt = document.getElementById(id+"-def"); - if (elt) elt.className = "highlight-hdr"; + if (elt) elt.className = "py-highlight-hdr"; var elt = document.getElementById(id+"-expanded"); - if (elt) elt.className = "highlight"; + if (elt) elt.className = "py-highlight"; var elt = document.getElementById(id+"-collapsed"); - if (elt) elt.className = "highlight"; + if (elt) elt.className = "py-highlight"; } function num_lines(s) { @@ -779,7 +691,7 @@ def lineno_to_html(self): template = '%%%ds' % self.linenum_size n = template % self.lineno - return '<span class="lineno">%s</span>' % n + return '<span class="py-lineno">%s</span>' % n def colorize(self): """ @@ -1119,7 +1031,7 @@ def mark_def(self, s, name): replacement = ('<a name="%s"></a><div id="%s-def">\\1' - '<a class="pysrc-toggle" href="#" id="%s-toggle" ' + '<a class="py-toggle" href="#" id="%s-toggle" ' 'onclick="toggle(\'%s\'); return false;">-</a>\\2' % (name, name, name, name)) return re.sub('(.*) (<span class="py-line">.*)\Z', replacement, s) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2006-07-05 11:29:54
|
Revision: 1239 Author: edloper Date: 2006-07-05 04:29:50 -0700 (Wed, 05 Jul 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1239&view=rev Log Message: ----------- Minor css change Modified Paths: -------------- trunk/epydoc/src/epydoc/docwriter/html_help.py Modified: trunk/epydoc/src/epydoc/docwriter/html_help.py =================================================================== --- trunk/epydoc/src/epydoc/docwriter/html_help.py 2006-07-05 11:29:29 UTC (rev 1238) +++ trunk/epydoc/src/epydoc/docwriter/html_help.py 2006-07-05 11:29:50 UTC (rev 1239) @@ -17,7 +17,7 @@ # Expects: {'this_project': name} HTML_HELP = ''' -<h1 class="help"> API Documentation </h1> +<h1 class="epydoc"> API Documentation </h1> <p> This document contains the API (Application Programming Interface) documentation for %(this_project)s. Documentation for the Python This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ed...@us...> - 2006-07-05 11:29:38
|
Revision: 1238 Author: edloper Date: 2006-07-05 04:29:29 -0700 (Wed, 05 Jul 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1238&view=rev Log Message: ----------- made 'ouptput' option in config file case insensitive Modified Paths: -------------- trunk/epydoc/src/epydoc/cli.py Modified: trunk/epydoc/src/epydoc/cli.py =================================================================== --- trunk/epydoc/src/epydoc/cli.py 2006-06-22 15:51:49 UTC (rev 1237) +++ trunk/epydoc/src/epydoc/cli.py 2006-07-05 11:29:29 UTC (rev 1238) @@ -70,6 +70,7 @@ from epydoc import log from epydoc.util import wordwrap, run_subprocess, RunSubprocessError from epydoc.apidoc import UNKNOWN +from epydoc.compat import * import ConfigParser INHERITANCE_STYLES = ('grouped', 'listed', 'included') @@ -314,7 +315,7 @@ if val not in ACTIONS: raise ValueError('"%s" expected one of: %s' % (optname, ', '.join(ACTIONS))) - options.action = val + options.action = val.lower() elif optname == 'target': options.target = val elif optname == 'inheritance': This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dva...@us...> - 2006-06-22 15:51:53
|
Revision: 1237 Author: dvarrazzo Date: 2006-06-22 08:51:49 -0700 (Thu, 22 Jun 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1237&view=rev Log Message: ----------- - Typo fixed. Modified Paths: -------------- trunk/epydoc/src/epydoc/docwriter/plaintext.py Modified: trunk/epydoc/src/epydoc/docwriter/plaintext.py =================================================================== --- trunk/epydoc/src/epydoc/docwriter/plaintext.py 2006-06-22 15:42:48 UTC (rev 1236) +++ trunk/epydoc/src/epydoc/docwriter/plaintext.py 2006-06-22 15:51:49 UTC (rev 1237) @@ -141,8 +141,8 @@ if pyval_repr is not UNKNOWN: val_repr = pyval_repr.expandtabs() else: - var_repr = var_doc.value.parse_repr - if var_repr is not UNKNOWN: + val_repr = var_doc.value.parse_repr + if val_repr is not UNKNOWN: if len(val_repr)+len(name) > 75: val_repr = '%s...' % val_repr[:75-len(name)-3] if '\n' in val_repr: val_repr = '%s...' % (val_repr.split()[0]) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dva...@us...> - 2006-06-22 15:42:53
|
Revision: 1236 Author: dvarrazzo Date: 2006-06-22 08:42:48 -0700 (Thu, 22 Jun 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1236&view=rev Log Message: ----------- - "output" correctly parsed from config file. Modified Paths: -------------- trunk/epydoc/src/epydoc/cli.py Modified: trunk/epydoc/src/epydoc/cli.py =================================================================== --- trunk/epydoc/src/epydoc/cli.py 2006-06-22 15:34:55 UTC (rev 1235) +++ trunk/epydoc/src/epydoc/cli.py 2006-06-22 15:42:48 UTC (rev 1236) @@ -311,10 +311,10 @@ 'module', 'object', 'value'): names.extend(val.replace(',', ' ').split()) elif optname == 'output': - if optname not in ACTIONS: + if val not in ACTIONS: raise ValueError('"%s" expected one of: %s' % (optname, ', '.join(ACTIONS))) - options.action = action + options.action = val elif optname == 'target': options.target = val elif optname == 'inheritance': This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dva...@us...> - 2006-06-22 15:35:00
|
Revision: 1235 Author: dvarrazzo Date: 2006-06-22 08:34:55 -0700 (Thu, 22 Jun 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1235&view=rev Log Message: ----------- - shell expansion is performed in the proper order. Modified Paths: -------------- trunk/epydoc/src/epydoc/cli.py Modified: trunk/epydoc/src/epydoc/cli.py =================================================================== --- trunk/epydoc/src/epydoc/cli.py 2006-06-22 14:53:52 UTC (rev 1234) +++ trunk/epydoc/src/epydoc/cli.py 2006-06-22 15:34:55 UTC (rev 1235) @@ -254,7 +254,7 @@ optparser.error("No names specified.") # perform shell expansion. - for i, name in enumerate(names[:]): + for i, name in reversed(list(enumerate(names[:]))): if '?' in name or '*' in name: names[i:i+1] = glob(name) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |