Re: [Cheetahtemplate-discuss] cheetah with webware
Brought to you by:
rtyler,
tavis_rudd
From: <lo...@ro...> - 2002-04-12 18:16:21
|
> Can you run Cheetah interactively? What happens if you do: > Yeah, that was one of my first tests. It works fine, the template prints, and the directory Cheetah is installed in shows up in the sys.path. > Now make a regular Webware servlet that just prints its path. Or if > Webware has that verbose traceback module (which I think it does now), > just raise RuntimeError() and it will show the Python path and a lot of > other information. Anyway, is the /lib/python/Webware/ directory > listed? I tried just putting 'from Cheetah.Template import Template' into a working webware example template, and it failed with the same error: ImportError: No module named Template > Is it possible that you have two copies of Python installed, each with No, only one installation of python on the system. > Does lib/python have a file Webware.pth that contains the word > "Webware"? Cheetah should have installed this; it's what makes Python > put the Webware/ directory in the Python path. Yes. I also tried putting the Webware directory explicitly in the Python path. > Have you seen the Webware chapter in the Cheetah Users' Guide? > http://www.cheetahtemplate.org/Current/docs/users_guide_html_multipage/ > I read it before i posted, but it mostly covers how to build templates with webware, not how to get cheetah working within webware. The code in ServletFactory.py that loads the modules looks like it only loads them from that directory. It makes calls to a method called _importModuleFromDirectory() for each subdirectory of that particular Context. I've tried printing sys.path right before the line that is choking in the webware server, and the path to cheetah is definetely there. -Lkb |