TclCommandQuit.py 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # ##########################################################
  2. # FlatCAM: 2D Post-processing for Manufacturing #
  3. # File Author: Marius Adrian Stanciu (c) #
  4. # Date: 8/17/2019 #
  5. # MIT Licence #
  6. # ##########################################################
  7. from ObjectCollection import *
  8. from tclCommands.TclCommand import TclCommand
  9. class TclCommandQuit(TclCommand):
  10. """
  11. Tcl shell command to quit FlatCAM from Tcl shell.
  12. example:
  13. """
  14. # List of all command aliases, to be able use old names for backward compatibility (add_poly, add_polygon)
  15. aliases = ['quit_flatcam']
  16. # Dictionary of types from Tcl command, needs to be ordered
  17. arg_names = collections.OrderedDict([
  18. ])
  19. # Dictionary of types from Tcl command, needs to be ordered , this is for options like -optionname value
  20. option_types = collections.OrderedDict([
  21. ])
  22. # array of mandatory options for current Tcl command: required = {'name','outname'}
  23. required = []
  24. # structured help for current command, args needs to be ordered
  25. help = {
  26. 'main': "Tcl shell command to quit FlatCAM from Tcl shell.",
  27. 'args': collections.OrderedDict([
  28. ]),
  29. 'examples': ['quit_flatcam']
  30. }
  31. def execute(self, args, unnamed_args):
  32. """
  33. :param args:
  34. :param unnamed_args:
  35. :return:
  36. """
  37. self.app.quit_application()