Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
genfsm is a tool that translates Python files containing embedded state machines written in state machine shorthand into pure Python files. The input file normally has extension .fsm and the output file has extension .py, although this is not required. genfsm is part of the cozmo-tools GitHub repository, which also includes the cozmo_fsm package.
Typically genfsm is called by passing it an input file and letting it generate the output file name by changing the extension from .fsm to .py:
$ genfsm MyThing.fsm Wrote generated code to MyThing.py.
If a different output file name is desired, it can be specified as the second argument.
A first argument of "-" tells genfsm to read from stdin (standard input).
A second argument of "-" tells genfsm to write to stdout (standard output).
Error messages are written to stderr.