From State Machine to Python

6 views
Skip to first unread message

Paul Tarvydas

unread,
May 3, 2026, 8:21:57 AM (8 days ago) May 3
to pi...@googlegroups.com

I walk through a simple three-state state machine and show how it is converted to Python code. This technique works for other languages. I use Python only as a lowest common denominator for this simplified example.

From State Machine to Python

pt


Mike Austin

unread,
May 4, 2026, 6:01:01 PM (7 days ago) May 4
to PiLuD
Nice. I can definitely understand that drawing better than the code! Now can it go the other way, like you said taking someone elses code and making a drawing?

Paul Tarvydas

unread,
May 4, 2026, 11:05:34 PM (6 days ago) May 4
to pi...@googlegroups.com

It's not magical. You still have to think. When you dissect someone else's code, you can capture your understanding on the back of an envelope. The interesting part is whether you can regenerate the same code from your sketch...


--
You received this message because you are subscribed to the Google Groups "PiLuD" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pilud+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pilud/0c75d140-4db2-4e5b-907d-99729c9a476cn%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages