For simplistic FSMs, if you want to avoid hand-coding all the transitions, actions etc., you could consider something like Libero (<a href="http://www.cs.vu.nl/~eliens/documents/libero/lrintr.htm">http://www.cs.vu.nl/~eliens/documents/libero/lrintr.htm</a>), although the last I checked Libero didn't generate Python yet (but I believe there might be similar options available with Python, though haven't come accross anything). Machine generated FSMs can be suboptimal for many cases though.<br>
<br><div class="gmail_quote">On Sun, Sep 13, 2009 at 10:28 AM, CTO <span dir="ltr"><<a href="mailto:debatem1@gmail.com">debatem1@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
On Sep 12, 4:39 pm, Peng Yu <<a href="mailto:pengyu...@gmail.com">pengyu...@gmail.com</a>> wrote:<br>
> Hi,<br>
<div class="im">><br>
> I have see some discussion on the implementation of finite state<br>
> machine in python. Can somebody point to me the best way in implenting<br>
> an FSM in python?<br>
><br>
</div><div class="im">> <a href="http://code.activestate.com/recipes/146262/" target="_blank">http://code.activestate.com/recipes/146262/</a><br>
><br>
> Regards,<br>
> Peng<br>
<br>
</div>I wrote an example of how to do it using Graphine a while back.<br>
Probably not the most efficient in the world, but pretty easy<br>
to read, and it allows you to add and remove states and transitions<br>
easily.<br>
<br>
URL: <a href="http://gitorious.org/graphine/pages/GraphineForPythonistas" target="_blank">http://gitorious.org/graphine/pages/GraphineForPythonistas</a><br>
<br>
Geremy Condra<br>
<div><div></div><div class="h5">--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>regards,<br>Banibrata<br><a href="http://www.linkedin.com/in/bdutta">http://www.linkedin.com/in/bdutta</a><br>