How to get the 'reactor' when the twisted application is started by twistd?

I wish there were a better answer but the way to get the current, active reactor in a Twisted application is: from twisted. Internet import reactor The important thing is to not do this all over the place, but once near the "top" of your application code, so that you can easily replace the reactor for testing purposes or to modify its behavior in other ways (for example, you could potentially change connectTCP to go through a proxy). That is why Agent takes a reactor parameter rather than importing the current one itself.

I wish there were a better answer, but the way to get the current, active reactor in a Twisted application is: from twisted. Internet import reactor The important thing is to not do this all over the place, but once near the "top" of your application code, so that you can easily replace the reactor for testing purposes or to modify its behavior in other ways (for example, you could potentially change connectTCP to go through a proxy). That is why Agent takes a reactor parameter rather than importing the current one itself.

I found this. So, the 'reactor' is global. Thanks @Glyph – davidshen84 Oct 3 at 9:23.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions