[Twisted-Python] twisted.protocols.telnet or twisted.conch.telnet?

James Tanis jtanis at pycoder.org
Tue Mar 21 01:32:14 EST 2006


> There's a HUGE difference in the amount of documentation available.
> Just learning this stuff for the first time, I need as much
> documentation as I can get... all the examples, and all the API docs,
> seem to be in twisted.protocols.telnet.  And of course I'd much rather
> use something that's at version 2.2 than something that's at version
> 0.6.

If you want documentation on how to use Twisted 2.0+ O'Rielly's book
is the best way to go, at least with the api's you'll want to know
about. I guess I could send you the mud I started writing with
Twisted. Only got so far as the server with a very world/mob
definitions, can't actually do anything but log in :P.. kind of left
it until I had more interest.

Honestly the only way to learn twisted well is by reading every little
bit of code your importing, and that includes the twisted code that it
in turn depends on :P Twisted can be quite hard to use as well as
understand without a good bit of time invested in trial and error. I
spend a good couple of weeks trying to figure out how to write an
email server - I finished 98% in the first day or two, but I've always
found twisted's way of handling authentication a bit confusing.. long
story short, I ended up spending a very long on some very small bits
of code :P. The learning curve is worth it though, because once enough
items click, implementation is much quicker then any other alternative
I've ever heard of.

>
> If conch is still unstable and hasn't hit 1.0, why is the old
> interface deprecated?  It seems silly to deprecate the old interface
> if the new one, being unstable, might change and require being
> deprecated again.  I'm sorry, I just don't understand.

Thats because your making some assumptions, such as the old interface
being stable. Hopefully I won't make anyone angry here, but Twisted is
by far, not a stable programming framework, it has made some good
strides towards that end, especially with 2.0+. Typically stable, as
it applies to Twisted, refers to whether or not the API can be
expected to go through any changes in the near future.. it doesn't
necessarily refer to stability as a "performance attribute."

>
> (FYI, I did download the entire tarball, but I only installed the
> "core" because I figured that that was all I needed.  I didn't
> anticipate that "correct" telnet interface had moved because, again,
> this isn't documented in the API reference, which I looked at before
> installing.)
>
> You say that Conch is better... how is it better?  Is
> twisted.protocol.telnet going away in the near future?  What the heck
> should I be using?  Other than the deprecated warning, I'm inclined to
> use the "old" twisted.protocols.telnet interface which at least has
> examples and documented functions.

conch.telnet has these also, not to mention a  book. Perhaps you
should try google if what is under documentation/howto/examples on the
twisted website isn't good enough. These two interfaces are basically
the same, one has just been extended/integrated/whatever so it can
take advantage of many of conch's very useful features.. vt100/ansi
and friends to name one.. it'd be very feasible to code a mud with an
interface intuitive enough users wouldn't need a mud client any
longer.. its much easier to ask how it hasn't been improved :P.
Its obvious here that you haven't bothered to look at the code. Dont
rely on just an API web index.. be a coder, read the code :P.
>
> Thanks again for your help.  It looks like I found your toolset in the
> midst of some huge confusing rewrite or something.  :)  Just my luck.
>

Buy the book, read the code, and most of all take your time. You did
not stumble in during a confusing rewrite, your just confused. If two
interfaces, one having an "unstable" api while the other is depracted,
stumps you.. you have a rocky road ahead. Luck has nothing to do with
learning how to use Twisted, on the other hand knowledge of Python and
prior coding experience does.

> On 3/19/06, Christopher Armstrong <radeex at gmail.com> wrote:
> > On 3/19/06, Christopher Armstrong <radeex at gmail.com> wrote:
> >
> > >
> > > On 3/18/06, James Schend <blakeyrat at gmail.com > wrote:
> > >
> > >
> > >
> > >
> > > > When I run that example, I get the message that
> > > > twisted.protocols.telnet is deprecated and I should instead be using
> > > > twisted.conch.telnet.
> > >
> > >
> > >
> > > > Is there something I'm missing here, or is Twisted telling me that I
> > > > should be using an unstable <1.0 library with no documentation that's
> > > > not even part of the core install instead of a 2.2 version library
> > > > with good documentation that *is* part of the core install?  Is this
> > > > deprecated warning in the wrong spot?  I don't get it.
> > >
> > >
> > >
> > >
> > > The telnet protocol implementation was simply moved to Conch. That
> > particular code is no more or less stable and documented than it was in its
> > old location. Also, if you're downloading tarballs, you should be getting
> > the full Twisted tarball, not the individual core/subproject tarballs. Those
> > individual ones are for embedders and OS packagers, basically. (The old web
> > site didn't make this as clear, and the new one encourages you to download
> > the full Twisted package).
> >
> >
> >
> > I'm sorry, it appears I'm mistaken. I was thinking that the telnet protocol
> > implementation moved to twisted.conch in the Great Split of Two Point Oh,
> > but I see that this was something else. The implementation in conch is
> > definitely different (and probably better), but I don't think my comment
> > about the state of documentation and stability is any less true.
> >
> > --
> > Christopher Armstrong
> > International Man of Twistery
> > http://radix.twistedmatrix.com/
> > http://twistedmatrix.com/
> > http://canonical.com/
> >
> > _______________________________________________
> > 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
>


--
James Tanis
jtanis at pycoder.org
http://pycoder.org




More information about the Twisted-Python mailing list