Re: How to do create a very simple tac file ?

Duncan McGreggor <[email protected]>
Newsgroups gmane.comp.python.twisted.web
Message-ID <CAFJQhU7qC9+ker+mDufxb6f0CD8Z_-gvqobQ2jpq+j_REuhDPQ@mail.gmail.com>
On Thu, Jul 14, 2011 at 7:05 AM, Thorne, Stephen <[email protected]> wrote:
> On Thu, Jul 14, 2011 at 13:50, Ivan <[email protected]> wrote:
>> I have a very simple example:
>>
>> from twisted.internet import protocol, utils, reactor
>>
>>
>> def start():
>>     utils.getProcessOutputAndValue('sleep',['1000'])
>>
>> reactor.callWhenRunning(start)
>> reactor.run()
>
> I put together an example of how to create a 'complete' example
> application using twisted plugins (which are also run with 'twistd'
> but allow things like command line arguments) a few weeks ago.
>
> repo is here: https://bitbucket.org/jerub/twisted-plugin-example
>
> It shows how to do things in 'Service.startService', this approach
> would map to using a .tac file as well, with some munging.
>
> https://bitbucket.org/jerub/twisted-plugin-example/src/a3af1e55194a/examplepackage/examplemodule.py#cl-49
>
> Stephen.

I gotta second this. This is the best example of Twisted plugins I've
seen yet. I know I'll regret saying this, but it's foolproof.

d
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.