X-Git-Url: http://git.tremily.us/?p=hooke.git;a=blobdiff_plain;f=hooke%2Fcommand_stack.py;h=4d5cd01f0aeec343c584c43991e27d55d46369ae;hp=6e84a913f1ff9731ad2da74927bb7694361b946d;hb=bef08c58d0c0e2482c8aa65def15f80875b78e5d;hpb=816713bbbb1a34d1975e608855af199bdab204d9 diff --git a/hooke/command_stack.py b/hooke/command_stack.py index 6e84a91..4d5cd01 100644 --- a/hooke/command_stack.py +++ b/hooke/command_stack.py @@ -163,6 +163,25 @@ class CommandStack (list): >>> c.clear() >>> print [repr(cm) for cm in c] [] + + YAMLize a curve argument. + + >>> from .curve import Curve + >>> c.append(CommandMessage('curve info', {'curve': Curve(path=None)})) + >>> print yaml.dump(c) + !!python/object/new:hooke.command_stack.CommandStack + listitems: + - !!python/object:hooke.engine.CommandMessage + arguments: + curve: !!python/object:hooke.curve.Curve + command_stack: !!python/object:hooke.command_stack.CommandStack {} + data: null + driver: null + info: {} + name: null + path: null + command: curve info + """ def execute(self, hooke, filter=None, stack=False): """Execute a stack of commands.