TclCommandVersion.py 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. from tclCommands.TclCommand import TclCommand
  2. import collections
  3. class TclCommandVersion(TclCommand):
  4. """
  5. Tcl shell command to check the program version.
  6. example:
  7. """
  8. # List of all command aliases, to be able use old names for backward compatibility (add_poly, add_polygon)
  9. aliases = ['version']
  10. description = '%s %s' % ("--", "Checks the program version.")
  11. # Dictionary of types from Tcl command, needs to be ordered
  12. arg_names = collections.OrderedDict([
  13. ])
  14. # Dictionary of types from Tcl command, needs to be ordered , this is for options like -optionname value
  15. option_types = collections.OrderedDict([
  16. ])
  17. # array of mandatory options for current Tcl command: required = {'name','outname'}
  18. required = []
  19. # structured help for current command, args needs to be ordered
  20. help = {
  21. 'main': "Checks the program version.",
  22. 'args': collections.OrderedDict([
  23. ]),
  24. 'examples': ['version']
  25. }
  26. def execute(self, args, unnamed_args):
  27. """
  28. :param args:
  29. :param unnamed_args:
  30. :return:
  31. """
  32. self.app.version_check()