[Twisted-Python] Re: In Defense of Taps
waterbug at beeblebrox.gsfc.nasa.gov
Wed Feb 12 13:53:05 EST 2003
Moshe Zadka wrote:
> I encourage the "newbies" on the list to speak up: what are *you* planning
> to do with Twisted, and which documents would help you with that.
You asked for it! Okay, so I'm not exactly a "newbie" (or
maybe a perennial newbie ;^). Anyway, I guess I'm an anomaly
in that I founds taps to be a nice and useful thing, as when I
started developing our server app, it was just after Glyph wrote
the "Writing a Twisted Plug-in" doc, so I used that as my sample
code to start with. I've attached my pgertap.py file so you can
get an idea of where we are (I've already described what we're
*trying* to do in earlier messages to the list). It's out of
context, and I'm not using any of the config options yet, but
there's the idea ...
And as an *exclusive* preview for folks on the twisted list :^),
you can download the PGEF ('Pan Galactic Engineering Framework')
source and have a closer look (this is definitely alpha!):
To install it:
1. gunzip, untar, install (python setup.py install)
2. install PostgreSQL if you don't have it yet
3. createdb pgerdb
4. run the shell scripts to load the reference data and the
(NOTE! When this script runs createPgerDbTables.sql, it
might look like it's caught in a loop when the "ALTER TABLES"
run, but don't give up ... 89 tables getting 6 ALTER's each
(or more) takes a while ... ;^)
5. run 'mktap pger', then 'twistd -f pger.tap'
You can fire up an interactive xmlrpc session to try
out the server (I'll put some demo sessions on the web
If you are *really* brave, you can try starting
up the client, but you will need to have wxPython
(22.214.171.124 or better), a recent version of ZODB (3.1 or
better recommended), reportlab, PIL, and log4p (yuck! we
just haven't had time to change that out yet). To start
it, cd into the PanGalactic/pangalactic/client
dir and run 'python fnord.py'. By default the client is
setup to interact with the server on localhost at port
8080. Do File/Login and just click 'OK' without entering
anything ... it's a dummy login for now, but that will
trigger the client to get the demo data from the server and
display it. You can get some ideas by turning on the
Options/Preferences/Show Tooltips (they are off by default).
The only docs so far are in the code ... best bets are:
(a) the comments in createPgerDbTables.sql
(b) the docstrings in pangalactic.common modules
and in pangalactic.repo.registry (which
is the guts of the O-R mapping I'm using ... t.e.row didn't
do quite what I wanted). We have several demos coming up, so
docs have temporarily fallen by the wayside.
The tests in PanGalactic/pangalactic/repo/tests are very
naive and (obviously) not real unit tests yet, but they
are useful to *me*, anyway!
I'd be really grateful if a twisted guru could look at the code
-- at least the "server" code (pangalactic.common, p.repo, p.tools),
and (after the wave of nausea has passed) comment on how it
could be improved ... or even contribute, as this will be
open sourced! I know zillions of things it needs, but
I'd especially like to hear about the twisted aspects that
I haven't used properly or have short-circuited somehow.
The only twisted things we're using on the client side so
far are jelly/unjelly, but we need to use twisted to make
our client non-blocking ... we just haven't got around to
integrating it with the twisted loop yet.
I'd be *ecstatic* if any of the twisted folk who are
coming to PyCon would like to do a pre-con sprint or a
post-con sprint with PanGalactic ... we will be at PyCon
(we're located just north of DC, anyway!).
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3996 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20030212/364050df/attachment.bin
More information about the Twisted-Python