Re: [Twisted-Python] suggestions sought on multi-service application dealing with shared database issue

2017-01-17 Thread Glyph Lefkowitz
> On Jan 16, 2017, at 16:16, Jonathan Vanasco wrote: > > > I have a few ideas on how to handle this, but wanted to see if anyone else > has dealt with this and has a recommended approach: > > I have a twisted daemon that I will loosely describe as this: > > * an application defined in

[Twisted-Python] twisted code works, after importing it does not anymore

2017-01-17 Thread steven meiers
hi, this websocket code works but now i would like to be able to import it to another class to have a way to send messages without waiting for the answer. the code is below here and also pasted here: https://bpaste.net/show/78 36ba3b8008 for some nice syntax highlighting. just running websock

Re: [Twisted-Python] How to get caller’s IP address in Perspective Broker server

2017-01-17 Thread Роман Мещеряков
17.01.2017, 09:52, "Glyph Lefkowitz" : This is untested but hopefully it will be close enough to put you on your way.  Make sense? This works perfectly! Thank you very much! :) -- Kind regards, Roman Mescheryakov  ___ Twisted-Python mailing list Twisted-

Re: [Twisted-Python] suggestions sought on multi-service application dealing with shared database issue

2017-01-17 Thread Jonathan Vanasco
On Jan 17, 2017, at 5:08 AM, Glyph Lefkowitz wrote: > > It depends if it's easier to keep track of when changes happen, or determine > what the current state is. > > If it's easier to keep track of when changes happen, I would recommend > calling `setServiceParent` to add/remove the service to

[Twisted-Python] Strange ImportError after switching from OS package to pip

2017-01-17 Thread Роман Мещеряков
Hi everyone! The 14.0.2 version of Twisted is latest that is available for Raspbian as a package, so until today I used it. I run my Twisted application in the following way: twistd -ny master_player2.tac There were no problems with starting my application.Yesterday I started facing strange problem

Re: [Twisted-Python] Strange ImportError after switching from OS package to pip

2017-01-17 Thread Jean-Paul Calderone
On Tue, Jan 17, 2017 at 12:53 PM, Роман Мещеряков < romanmescherya...@yandex.ru> wrote: > *Hi everyone! The 14.0.2 version of Twisted is latest that is available > for Raspbian as a package, so until today I used it. I run my Twisted > application in the following way:* > > > *twistd -ny master_pl

Re: [Twisted-Python] How to get caller’s IP address in Perspective Broker server

2017-01-17 Thread Glyph Lefkowitz
> On Jan 17, 2017, at 6:06 AM, Роман Мещеряков > wrote: > > 17.01.2017, 09:52, "Glyph Lefkowitz" : >> > >> This is untested but hopefully it will be close enough to put you on your >> way. Make sense? > > > This works perfectly! Thank you very much! :) Glad we could help! -g _

Re: [Twisted-Python] suggestions sought on multi-service application dealing with shared database issue

2017-01-17 Thread Glyph Lefkowitz
> On Jan 17, 2017, at 7:56 AM, Jonathan Vanasco wrote: > > Can you point to some docs about setServiceParent being used to remove the > service? I couldn't find that anywhere. Sorry, I meant you should use https://twistedmatrix.com/documents/16.6.0/api/twisted.application.service.IService.ht

Re: [Twisted-Python] Strange ImportError after switching from OS package to pip

2017-01-17 Thread Glyph Lefkowitz
> On Jan 17, 2017, at 9:53 AM, Роман Мещеряков > wrote: > > Hi everyone! The 14.0.2 version of Twisted is latest that is available for > Raspbian as a package, so until today I used it. I run my Twisted application > in the following way: > twistd -ny master_player2.tac > There were no proble

Re: [Twisted-Python] suggestions sought on multi-service application dealing with shared database issue

2017-01-17 Thread Jonathan Vanasco
On Jan 17, 2017, at 6:42 PM, Glyph Lefkowitz wrote: > > Sorry, I meant you should use > https://twistedmatrix.com/documents/16.6.0/api/twisted.application.service.IService.html#disownServiceParent > disownServiceParent. > wonderful! thanks! so much!