At 10:55 AM 6/8/01 -0700, Tavis Rudd wrote:
>Geoff,
>you've got a good point.  If we could sort out the import
>logic needed to get #extend working properly with .tmpl files
>and @extend working with .psp files that would be ideal.

It might be a bit of a mess in the case of PSP because the generated 
modules for PSPs are stored in a different directory altogether, with the 
filename and the class name constructed from the full path.

I gather that TemplateServer just spits out a .py file in the same 
directory as the .tmpl file, with the same name?

That leads me to think one of these two things:

- PSP could do the same thing as TemplateServer -- just write out the .py 
file into the same directory as the PSP, with the same filename and class 
name.  That requires write access.

or,

- there was some compelling reason why PSP chose to use a different 
directory and different naming convention, and TemplateServer will run into 
the same issues :-)  Maybe it's the write access issue, or maybe it was 
just done to hide the details of the implementation from the end user and 
avoid cluttering up the directory.  Or, maybe it's because if you 
automatically compile the .tmpl file into a .py file of the same name, then 
it's ambiguous which one you want to serve?

>The generated code for #extend Templates.SkeletonPage could
>be:
>============================================
>try:
>     from Templates.SkeletonPage import SkeletonPage
>except:

That should probably be "except ImportError"

>     SkeletonPage = importTmplFile("Templates.SkeletonPage")
>     # raise another ImportError exception if nothing found

PSP could probably do something similar.  The details might be tricky.


--

- Geoff Talvola
   [EMAIL PROTECTED]

_______________________________________________
Webware-devel mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/webware-devel

Reply via email to