[Twisted-web] deployment with twistd of simple web application

Glyph glyph at twistedmatrix.com
Tue Nov 5 11:25:27 MST 2013


On Nov 5, 2013, at 5:19 AM, Axel Rau <Axel.Rau at Chaos1.DE> wrote:

> 
> Am 05.11.2013 um 13:43 schrieb Axel Rau <Axel.Rau at chaos1.de>:
> 
>> ---
>> twisted does not start up. Interrupting it, gives
>> "exceptions.ImportError: cannot import name meteoFactory"
> 
> It seems to not find my modules:
>     from meteo import meteoFactory
> I assumed twistd looks relative to the tac file.
> Giving twistd a --rundir option does not help either.

twistd is a python program, which means it finds modules based on the same rules Python uses for finding modules.

There are numerous ways you could adjust sys.path; you can use virtualenv, or set PYTHONPATH, or just sys.path.append within the tac file itself.

-glyph


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://twistedmatrix.com/pipermail/twisted-web/attachments/20131105/ae52cfa7/attachment.html>


More information about the Twisted-web mailing list