mirror of
				https://github.com/Klipper3d/klipper.git
				synced 2025-10-31 02:15:52 +01:00 
			
		
		
		
	gcode_macro: add iterator to status wrapper
It really helps to see a snapshot of available printer variables when building menus and macros. The list of variables always depends on what printer config you have. Signed-off-by: Janar Sööt <janar.soot@gmail.com>
This commit is contained in:
		| @@ -34,6 +34,10 @@ class GetStatusWrapper: | ||||
|         except KeyError as e: | ||||
|             return False | ||||
|         return True | ||||
|     def __iter__(self): | ||||
|         for name, obj in self.printer.lookup_objects(): | ||||
|             if self.__contains__(name): | ||||
|                 yield name | ||||
|  | ||||
| # Wrapper around a Jinja2 template | ||||
| class TemplateWrapper: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user