[albatross-users] pagination with al-for

Dave Cole djc at object-craft.com.au
Fri Jan 9 11:46:47 EST 2004


On Tue, 2004-01-06 at 20:42, Matt Goodall wrote:
> There have been a couple of suggestions for how to fix the problem:
> 
>    1. Hack the import machinery. Instead of importing page modules as
>       is, concoct a package and module name to avoid clashes. I think I
>       found a problem with this approach (something to do with importing
>       builtin packages like os and os.path) but I can't remember the
>       details now. I think I also found a way to avoid the problem.
>    2. Force the use of a proper package structure for page modules.
>       Albatross could then import modules in the normal way; developers
>       would have to scatter a page module directory structure with
>       __init__.py files. This all sounds fine but I think it changes the
>       concept of page modules a little. It would also break my code but
>       I don't think it would be too difficult to fix that.

I prefer this solution.

>    3. Use execfile() to "import" page modules. This avoids touching
>       sys.modules at all which is great. However, there is a possible
>       (i.e. no one has profiled it yet) performance hit for plain old
>       CGI users because Albatross would no longer benefit from compiled
>       page modules. There is also an issue with storing certain types of
>       object is the session caused by the way the pickle machinery works.

- Dave

-- 
http://www.object-craft.com.au




More information about the Albatross-users mailing list