[Twisted-Python] problem with a tutorial

Rob Smith palacenataku at yahoo.com
Mon Mar 26 12:50:45 MDT 2007


I'm hoping this is just a simple configuration problem
I have.

I followed the tutorial for Using the Twisted
Application Framework and created the .tac file shown
below:

from twisted.application import internet, service
from qotdfactory import QOTDFactory

port = 7001
factory = QOTDFactory()

application = service.Application("qotd")
echoService = internet.TCPServer(port, factory)
echoService.setServiceParent(application)

As soon as I run it with twistd on my winXP laptop it
fails with an Import error "no module named
qotdfactory". qotdfactory.py exists in the same
directory as the .tac file.

If I take the code in the .py file and put it directly
in the .tac file, the program runs without trouble.
I've tried adding the directory both files are in to
the windows path variable, and tried adding a
__init__.py file to the directory. Neither made a
difference.

Any thoughts on what I'm missing?

Thanks,
Rob Smith


 
____________________________________________________________________________________
Sucker-punch spam with award-winning protection. 
Try the free Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/features_spam.html




More information about the Twisted-Python mailing list