Top-rated recipes tagged "machine"http://code.activestate.com/recipes/tags/machine/top/2011-09-30T05:16:56-07:00ActiveState Code RecipesDynamically Generated Python State Machine (Python) 2011-09-30T05:16:56-07:00__nerohttp://code.activestate.com/recipes/users/4177968/http://code.activestate.com/recipes/577693-dynamically-generated-python-state-machine/ <p style="color: grey"> Python recipe 577693 by <a href="/recipes/users/4177968/">__nero</a> (<a href="/recipes/tags/dynamically/">dynamically</a>, <a href="/recipes/tags/finite/">finite</a>, <a href="/recipes/tags/generated/">generated</a>, <a href="/recipes/tags/machine/">machine</a>, <a href="/recipes/tags/state/">state</a>). Revision 6. </p> <p>This is a state machine template. It can be used as a state machine, or a state machine tester. There is very little setup required and all the states are added based on the state docstring. I made this after a friend came to me asking how I'd implement one, complaining that he couldn't find a nice example. I hope this helps.</p> simple state machine implementation (Python) 2010-07-15T17:54:17-07:00David Klaffenbachhttp://code.activestate.com/recipes/users/2007923/http://code.activestate.com/recipes/577308-simple-state-machine-implementation/ <p style="color: grey"> Python recipe 577308 by <a href="/recipes/users/2007923/">David Klaffenbach</a> (<a href="/recipes/tags/machine/">machine</a>, <a href="/recipes/tags/state/">state</a>). </p> <p>A very simple idiom for implementing a state machine.</p>