- some small corrections

This commit is contained in:
Marius Stanciu 2018-06-02 16:17:46 +03:00
parent ddda4773e3
commit 21406fcccf
1 changed files with 5 additions and 5 deletions

View File

@ -28,17 +28,18 @@ class TclCommandListSys(TclCommand):
# structured help for current command, args needs to be ordered # structured help for current command, args needs to be ordered
help = { help = {
'main': "Returns the list of the names of system variables.\n" 'main': "Returns the list of the names of system variables.\n"
"Without a parameter it will list all the system parameters. " "Without an argument it will list all the system parameters. "
"As a parameter use first letter or first letters from the name " "As an argument use first letter or first letters from the name "
"of the system variable.\n" "of the system variable.\n"
"In that case it will list only the system variables that starts with that string.\n" "In that case it will list only the system variables that starts with that string.\n"
"Main categories start with: gerber or excellon or geometry or cncjob or global.\n" "Main categories start with: gerber or excellon or geometry or cncjob or global.\n"
"Note: Use get_sys command to get the value and set_sys command to set it.\n", "Note: Use get_sys TclCommand to get the value and set_sys TclCommand to set it.\n",
'args': collections.OrderedDict([ 'args': collections.OrderedDict([
]), ]),
'examples': ['list_sys', 'examples': ['list_sys',
'list_sys ser'
'list_sys gerber', 'list_sys gerber',
'list_sys cncjob'] 'list_sys cncj']
} }
def execute(self, args, unnamed_args): def execute(self, args, unnamed_args):
@ -50,7 +51,6 @@ class TclCommandListSys(TclCommand):
""" """
if 'selection' in args: if 'selection' in args:
argument = args['selection'] argument = args['selection']
print(argument)
return str([k for k in self.app.defaults.keys() if str(k).startswith(str(argument))]) return str([k for k in self.app.defaults.keys() if str(k).startswith(str(argument))])
else: else:
return str([*self.app.defaults]) return str([*self.app.defaults])