Changeset 6912 for lang/python
- Timestamp:
- 02/19/08 14:40:24 (5 years ago)
- Files:
-
- 1 modified
-
lang/python/tasktools/trunk/tasktools.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/python/tasktools/trunk/tasktools.py
r6908 r6912 21 21 import distutils.dist 22 22 from distutils.dist import Distribution 23 import distutils.command 23 import distutils.command as scommands 24 24 25 25 __version__ = "1.0.0" … … 30 30 _cmds = _Odict() 31 31 _namespace = [] 32 _old_scommands = scommands.__all__ 32 33 33 34 _get_ns = lambda:_namespace and _va["nssep"].join(_namespace)+_va["nssep"] or "" … … 39 40 _va["nssep"] = ":" 40 41 _clear_commands() 42 scommands.__all__ = [] 41 43 distutils.dist.command_re = re.compile("[a-zA-Z0-9_:]+") 42 44 Distribution.common_usage = "" 43 45 def new_print_command_list (self, commands, header, max_length): 44 if header == "Standard commands" : return46 if header == "Standard commands" and not scommands.__all__ : return 45 47 if "extra" in header.lower() : header = "Commands" 46 48 return self.old_print_command_list(commands, header, max_length) … … 88 90 if "sub_commands" in d: 89 91 cls.description += "\n\tsub commands:\n"+"\n".join("\t\t"+i for i,j in d["sub_commands"]) 92 if name in _old_scommands and name not in scommands.__all__: scommands.__all__.append(name) 90 93 if class_name != "Task" : _cmds[name] = cls 91 94 return cls
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)