[Twisted-Python] Getting the options object from the service
Jonas Brunsgaard
jonas.brunsgaard at gmail.com
Tue Mar 18 17:39:54 MDT 2014
lvh, thanks for your answer.
I will keep parsing the options object around.
On Mon, Mar 17, 2014 at 2:20 PM, Laurens Van Houtven <_ at lvh.io> wrote:
> Hi Jonas,
>
>
> I strongly prefer to pass the options around (through the Service objects
> you're making) rather than relying on the global state of the plugin
> instance.
>
>
> hth
> lvh
>
>
>
> On Mon, Mar 17, 2014 at 2:02 PM, Jonas Brunsgaard <
> jonas.brunsgaard at gmail.com> wrote:
>
>> Hello Everybody
>>
>> What is the prefered way to get the options object from the servicemaker
>> when using twistd plugins.
>>
>> I guess i could access the object via
>>
>> from twisted.plugins.my_plugin import myServiceMaker
>> options = myServicemMaker.options
>>
>> But is there a better way to do it? Somthing like
>>
>> from somwhere import get_service_config()
>> options = get_service_config()
>>
>> All the best
>>
>> --
>> Brunsgaard
>>
>>
>>
>>
>> _______________________________________________
>> Twisted-Python mailing list
>> Twisted-Python at twistedmatrix.com
>> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>>
>>
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20140319/c087848c/attachment-0002.html>
More information about the Twisted-Python
mailing list