[Twisted-Python] Problems running Twisted

Christopher Armstrong radix at twistedmatrix.com
Fri Feb 20 05:09:15 EST 2004

Phil Hunt wrote:
> I'm trying to set up a (very simple) web server using Twisted.
> I'm using this example from the documentation:


>    $ python teg1.py
> Python complains that it can't import twisted.web:
> I've previously installed Twisted by running:
>    $ python setup.py install
> which I thought would install all the modules and put them correctly
> in the PYTHONPATH (tell me if this isn't true).

It doesn't actually modify PYTHONPATH, it (hopefully) puts Twisted in a 
directory that's already in sys.path.

Which version of python did you run setup.py? Ensure 
/usr/lib/pythonX.X/site-packages/twisted exists. Make sure you're 
running your script with the same version.

> Am I doing somethnig wrong? I feel I have missed something fundamental, but
> don't know what. Should I rename my file to <teg1.rpy> or something? Do I
> need to run at the command-line ``mktap'' instead of ``python''?

No, the way you're doing it is fine.

  Twisted | Christopher Armstrong: International Man of Twistery
   Radix  |          Release Manager,  Twisted Project
---------+           http://radix.twistedmatrix.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20040220/566e3f48/attachment.pgp 

More information about the Twisted-Python mailing list