TclCommandQuit.py 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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 tclCommands.TclCommand import TclCommand
  8. import collections
  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. description = '%s %s' % ("--", "Tcl shell command to quit FlatCAM from Tcl shell.")
  17. # Dictionary of types from Tcl command, needs to be ordered
  18. arg_names = collections.OrderedDict([
  19. ])
  20. # Dictionary of types from Tcl command, needs to be ordered , this is for options like -optionname value
  21. option_types = collections.OrderedDict([
  22. ])
  23. # array of mandatory options for current Tcl command: required = {'name','outname'}
  24. required = []
  25. # structured help for current command, args needs to be ordered
  26. help = {
  27. 'main': "Tcl shell command to quit FlatCAM from Tcl shell.",
  28. 'args': collections.OrderedDict([
  29. ]),
  30. 'examples': ['quit_flatcam']
  31. }
  32. def execute(self, args, unnamed_args):
  33. """
  34. :param args:
  35. :param unnamed_args:
  36. :return:
  37. """
  38. self.app.quit_application()