Cleanup of TclCommand and migrated a few more commands to new architecture.

This commit is contained in:
Juan Pablo Caram
2016-10-18 11:36:58 -04:00
parent e6f01cc834
commit 261054f1cf
8 changed files with 272 additions and 78 deletions

View File

@@ -0,0 +1,47 @@
from ObjectCollection import *
import TclCommand
class TclCommandVersion(TclCommand.TclCommand):
"""
Tcl shell command to check the program version.
example:
"""
# List of all command aliases, to be able use old names for backward compatibility (add_poly, add_polygon)
aliases = ['version']
# Dictionary of types from Tcl command, needs to be ordered
arg_names = collections.OrderedDict([
])
# Dictionary of types from Tcl command, needs to be ordered , this is for options like -optionname value
option_types = collections.OrderedDict([
])
# array of mandatory options for current Tcl command: required = {'name','outname'}
required = []
# structured help for current command, args needs to be ordered
help = {
'main': "Checks the program version.",
'args': collections.OrderedDict([
]),
'examples': []
}
def execute(self, args, unnamed_args):
"""
:param args:
:param unnamed_args:
:return:
"""
self.app.version_check()