Re: [Twisted-Python] automat question

2021-03-16 Thread Glyph
> On Mar 16, 2021, at 1:09 AM, Chris Withers wrote: > > > On 15/03/2021 09:34, Glyph wrote: >>> Right, but as best I can tell, outputs in automat have to be defined as >>> part of the state machine class, I need targets only available after class >>> instantiation to be notified. >> Outputs

Re: [Twisted-Python] automat question

2021-03-16 Thread Chris Withers
On 15/03/2021 09:34, Glyph wrote: Right, but as best I can tell, outputs in automat have to be defined as part of the state machine class, I need targets only available after class instantiation to be notified. Outputs are just methods, so it sort of depends what you mean by "after class

Re: [Twisted-Python] automat question

2021-03-15 Thread Glyph
> On Mar 15, 2021, at 1:18 AM, Chris Withers wrote: > > On 09/03/2021 18:53, Glyph wrote: >>> On Mar 9, 2021, at 3:18 AM, Chris Withers >> > wrote: >>> >>> I'm not sure we're quite on the same page: I'm not looking to inspect the >>> state, but more be notified when

Re: [Twisted-Python] automat question

2021-03-15 Thread Chris Withers
On 09/03/2021 18:53, Glyph wrote: On Mar 9, 2021, at 3:18 AM, Chris Withers > wrote: I'm not sure we're quite on the same page: I'm not looking to inspect the state, but more be notified when certain edges are traversed. The way you get notified when an edge is tra

Re: [Twisted-Python] automat question

2021-03-09 Thread Glyph
> On Mar 9, 2021, at 3:18 AM, Chris Withers wrote: > > I'm not sure we're quite on the same page: I'm not looking to inspect the > state, but more be notified when certain edges are traversed. The way you get notified when an edge is traversed is you add an output to that edge :). When I was

Re: [Twisted-Python] automat question

2021-03-09 Thread Chris Withers
I'm not sure we're quite on the same page: I'm not looking to inspect the state, but more be notified when certain edges are traversed. That said: what's the best practice when you want to visualize the current state of a machine? In this case, the machine is for a unit of work in a scheduling

Re: [Twisted-Python] automat question

2021-03-07 Thread Glyph
Automat is designed to make this sort of thing intentionally annoying, as you have discovered:). The idea is that if you want to know this sort of internal state, it’s for a specific reason. That's not a blanket "No" — see for example how automat deals with serialization — but each such inter

[Twisted-Python] automat question

2021-03-07 Thread Chris Withers
Hi, Apologies if there's a better list for this, please let me know where... I've grown to like Glyph's automat package a lot, but in a current project, I have observers that need to know when a machine changes state. What's the best way to let those observers know? cheers, Chris _