Easy State-Machine for python