Re: [Twisted-Python] Twisted Plugins - Implementation Discussion

2011-04-21 Thread anatoly techtonik
On Fri, Apr 22, 2011 at 4:01 AM, David wrote: > On 04/22/2011 06:21 AM, anatoly techtonik wrote: >> On Thu, Apr 21, 2011 at 4:48 AM, Kevin Horn  wrote: >>> >>> cluster.  So he rewrote distutils with an eye on keeping things nice for >>> everyone.  Project managers, distro packagers, users inst

Re: [Twisted-Python] Twisted Plugins - Implementation Discussion

2011-04-21 Thread Glyph Lefkowitz
On Apr 21, 2011, at 9:01 PM, David wrote: > You can take a look at bento, which is my own response to the distutils > issues we have in the scipy community (but I would expect twisted and > most big python libraries to have similar issues): > > http://cournape.github.com/Bento/ > > It is desi

Re: [Twisted-Python] Twisted Plugins - Implementation Discussion

2011-04-21 Thread Mikhail Terekhov
On Thu, Apr 21, 2011 at 9:01 PM, David wrote: > On 04/22/2011 06:21 AM, anatoly techtonik wrote: > > On Thu, Apr 21, 2011 at 4:48 AM, Kevin Horn > wrote: > >> > >> cluster. So he rewrote distutils with an eye on keeping things nice > for > >> everyone. Project managers, distro packagers, u

Re: [Twisted-Python] Twisted Plugins - Implementation Discussion

2011-04-21 Thread David
On 04/22/2011 06:21 AM, anatoly techtonik wrote: > On Thu, Apr 21, 2011 at 4:48 AM, Kevin Horn wrote: >> >> cluster. So he rewrote distutils with an eye on keeping things nice for >> everyone. Project managers, distro packagers, users installing software, >> etc. This is distutils2. In Pyt

Re: [Twisted-Python] Understanding deferred and error handling

2011-04-21 Thread David
On 04/21/2011 10:12 AM, exar...@twistedmatrix.com wrote: > log.err takes an additional argument which you can use easily like this: > > def main(): > d = remote_call() > d.addErrback(log.err, "remote_call failed") > def _stop(ignored): > reactor.stop()

Re: [Twisted-Python] Twisted Plugins - Implementation Discussion

2011-04-21 Thread anatoly techtonik
On Thu, Apr 21, 2011 at 4:48 AM, Kevin Horn wrote: > > cluster.  So he rewrote distutils with an eye on keeping things nice for > everyone.  Project managers, distro packagers, users installing software, > etc.  This is distutils2.  In Python 3.3 and up it will be called > "packaging".  Once p

Re: [Twisted-Python] Running twistd with a compiled file

2011-04-21 Thread anatoly techtonik
On Thu, Apr 21, 2011 at 8:26 PM, wrote: > On 04:28 pm, albert.bra...@weiermayer.com wrote: >>On Thu, Apr 21, 2011 at 08:17:04AM -0400, Itamar Turner-Trauring wrote: >>>The .tac file (or application.py) should typically be two lines of >>>code, >>>just importing everything from elsewhere, so reall

Re: [Twisted-Python] Running twistd with a compiled file

2011-04-21 Thread exarkun
On 04:28 pm, albert.bra...@weiermayer.com wrote: >On Thu, Apr 21, 2011 at 08:17:04AM -0400, Itamar Turner-Trauring wrote: >>The .tac file (or application.py) should typically be two lines of >>code, >>just importing everything from elsewhere, so really just having it in >>Python seems the easiest

Re: [Twisted-Python] Running twistd with a compiled file

2011-04-21 Thread Glyph Lefkowitz
On Apr 21, 2011, at 3:27 AM, Albert Brandl wrote: > Is this a known problem? Can you suggest a workaround? Deploy your application as a plugin rather than a tac file. The plugin system will properly scan for compiled python files and load them as regular modules. This has other advantages as

Re: [Twisted-Python] Running twistd with a compiled file

2011-04-21 Thread Albert Brandl
On Thu, Apr 21, 2011 at 08:17:04AM -0400, Itamar Turner-Trauring wrote: > The .tac file (or application.py) should typically be two lines of code, > just importing everything from elsewhere, so really just having it in > Python seems the easiest solution. This is a good argument. I was afraid that

Re: [Twisted-Python] Running twistd with a compiled file

2011-04-21 Thread Itamar Turner-Trauring
On Thu, 2011-04-21 at 09:27 +0200, Albert Brandl wrote: > Of course, it's possible to move most of the logic to other (compiled) > files, but I'd prefer if the application itself could also be deployed > in compiled form. The .tac file (or application.py) should typically be two lines of code, jus

[Twisted-Python] Running twistd with a compiled file

2011-04-21 Thread Albert Brandl
Hi! It is sometimes necessary to deploy an application without the sources. But when I try to start the twistd daemon with a compiled Python file, it raises the following traceback: $ twistd -ny application.pyc Traceback (most recent call last): File "/usr/local/lib/python2.6/dist-packages/Tw