[Twisted-Python] Running twisted app in a different thread

2010-01-04 Thread Devraj Mukherjee
Hi all, I am new to Twisted, please be gentle :) The Twisted application I am dealing with is python-vnc-viewer (http://python-vnc.viewer.googlecode.com). We are attempting the RFB library implemented using Twisted in our application, to bring up a customer viewer. Our uses a threading model tha

Re: [Twisted-Python] A pseudo-deferred class that can be canceled

2010-01-04 Thread Andrew Bennetts
Terry Jones wrote: > I just wrote the below for fun. It's untested :-) > > It's a class that you initialize with a callable (f), and which gives you > back a deferred (d) that will fire when f fires. Alternately, you can fire > d yourself by calling 'callback' or 'errback' on the class instance a

Re: [Twisted-Python] lore2sphinx themeing

2010-01-04 Thread Kevin Horn
On Mon, Jan 4, 2010 at 8:46 PM, Glyph Lefkowitz wrote: > > On Jan 4, 2010, at 7:18 PM, Kevin Horn wrote: > > > Thanks to a quick patch from Michael Thompson, the current output of the > Sphinx conversion [1] now matches the color scheme and typographic style of > the main twisted site. It's using

Re: [Twisted-Python] lore2sphinx table handling?

2010-01-04 Thread Tim Allen
On Mon, Jan 04, 2010 at 11:23:37PM -0500, James Y Knight wrote: > On Jan 4, 2010, at 8:32 PM, Tim Allen wrote: > > while Grid Tables look pretty, actually editing them requires an Emacs > > mode, or a lot of patience. > > But when you *do* have an emacs mode (and, really, doesn't everynoe?) Wel

Re: [Twisted-Python] A pseudo-deferred class that can be canceled

2010-01-04 Thread Terry Jones
As a final followup before bed... I chose not to have a 'cancel' method on my class because that seemed misleading. You're not really canceling anything. You're just asking that a deferred that you got earlier be fired right now with a value of your choosing. So I made 2 methods, and named them 'c

Re: [Twisted-Python] A pseudo-deferred class that can be canceled

2010-01-04 Thread Terry Jones
Hi Glyph I read through without trying to get all the details (some are not relevant to me, see below). I'll make a few comments here, then continue in the ticket, supposing there's interest. - It would simplify things to separate discussion of cancelin

Re: [Twisted-Python] lore2sphinx table handling?

2010-01-04 Thread James Y Knight
On Jan 4, 2010, at 8:32 PM, Tim Allen wrote: > I think the List Table format is probably the easiest to maintain in > a simple text editor, followed by the Simple Table format. CSV mode > looks like it's really designed for you to keep the table in an > external > file and edit it in a spreadsh

Re: [Twisted-Python] A pseudo-deferred class that can be canceled

2010-01-04 Thread Terry Jones
> "Glyph" == Glyph Lefkowitz writes: Glyph> I already lost you at the first sentence. :-) Sorry. Glyph> The class below never appears to use 'self._f' Oops, that should have been a self._f in the call method. Glyph> and ... Deferreds are things that fire, I don't see how the callable Glyp

Re: [Twisted-Python] A pseudo-deferred class that can be canceled

2010-01-04 Thread Glyph Lefkowitz
On Jan 4, 2010, at 9:22 PM, Terry Jones wrote: > I just wrote the below for fun. It's untested :-) > It's a class that you initialize with a callable (f), and which gives you > back a deferred (d) that will fire when f fires. Alternately, you can fire > d yourself by calling 'callback' or 'errb

Re: [Twisted-Python] lore2sphinx themeing

2010-01-04 Thread Glyph Lefkowitz
On Jan 4, 2010, at 7:18 PM, Kevin Horn wrote: > Thanks to a quick patch from Michael Thompson, the current output of the > Sphinx conversion [1] now matches the color scheme and typographic style of > the main twisted site. It's using the layout of the 'default' sphinx theme > (previously was

[Twisted-Python] A pseudo-deferred class that can be canceled

2010-01-04 Thread Terry Jones
I just wrote the below for fun. It's untested :-) It's a class that you initialize with a callable (f), and which gives you back a deferred (d) that will fire when f fires. Alternately, you can fire d yourself by calling 'callback' or 'errback' on the class instance and passing a value. That val

Re: [Twisted-Python] lore2sphinx table handling?

2010-01-04 Thread Tim Allen
On Mon, Jan 04, 2010 at 06:08:17PM -0600, Kevin Horn wrote: > Any of these formats should work fine, but I'm curious as to what people (in > particular the core devs) think as to which should be the preferred method > in the Sphinx documentation. I'm not a core dev, but I'll chime in so that at le

Re: [Twisted-Python] lore2sphinx table handling?

2010-01-04 Thread Glyph Lefkowitz
On Jan 4, 2010, at 8:21 PM, Michael Hudson-Doyle wrote: > 2010/1/5 Kevin Horn : >> Sphinx uses plain ReST tables, and from what I can tell, ReST has 4 (yes, >> 4!) ways of marking up tables: >> >> Grid tables >> http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#grid-tables >> -

Re: [Twisted-Python] lore2sphinx table handling?

2010-01-04 Thread Michael Hudson-Doyle
2010/1/5 Kevin Horn : > Sphinx uses plain ReST tables, and from what I can tell, ReST has 4 (yes, > 4!) ways of marking up tables: > > Grid tables > http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#grid-tables > - ASCII-art style tables I tend to use these, because they're what e

Re: [Twisted-Python] lore2sphinx themeing

2010-01-04 Thread Reza Lotun
Hi Kevin, > Thanks to a quick patch from Michael Thompson, the current output of > the Sphinx conversion [1] now matches the color scheme and > typographic style of the main twisted site. It's using the layout > of the 'default' sphinx theme (previously was using the 'sphinxdoc' > theme).

[Twisted-Python] lore2sphinx themeing

2010-01-04 Thread Kevin Horn
Thanks to a quick patch from Michael Thompson, the current output of the Sphinx conversion [1] now matches the color scheme and typographic style of the main twisted site. It's using the layout of the 'default' sphinx theme (previously was using the 'sphinxdoc' theme). I'd like to know what peopl

[Twisted-Python] lore2sphinx table handling?

2010-01-04 Thread Kevin Horn
Sphinx uses plain ReST tables, and from what I can tell, ReST has 4 (yes, 4!) ways of marking up tables: Grid tables http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#grid-tables - ASCII-art style tables Simple Tables http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.