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/