[Twisted-Python] How do I run a twisted server directly
Alexander May
alex-news at comcast.net
Fri May 14 18:20:24 MDT 2004
> Basically, Don't Do That. It's unlikely there's a good reason to.
I'd like to use my IDE to debug rather than the python debugger.
Also, I ran twistd.py and got "Please use twistw on windows, not twistd"
(I'm on windows sometimes). I then ran twistw.py and nothing happened. I
looked at the file, and there were only class and function definitions. I
added "run()" at the end of the file and it seems to work. I'm using the
version 1.2.0 which was marked as "Twisted Stable Release" on the download
page.
Alex
-----Original Message-----
From: twisted-python-bounces at twistedmatrix.com
[mailto:twisted-python-bounces at twistedmatrix.com] On Behalf Of Christopher
Armstrong
Sent: Friday, May 14, 2004 4:33 PM
To: Twisted discussion stuff
Subject: Re: [Twisted-Python] How do I run a twisted server directly
Alexander May wrote:
> Thanks, I'll give that a try. How about my first question, running it
> directly without twistd. Something along the lines of:
>
> if '__main__' == __name__:
> # do something to start application directly
Basically, Don't Do That. It's unlikely there's a good reason to. If you
just want to learn how it works under the hood, then read twistd's
source: twisted/scripts/twistd.py. twisted/application/app.py is also
relevant.
--
Twisted | Christopher Armstrong: International Man of Twistery
Radix | Release Manager, Twisted Project
---------+ http://radix.twistedmatrix.com/
More information about the Twisted-Python
mailing list