examples for HTMLgen
Anders M Eriksson
anders.eriksson at morateknikutveckling.se
Mon Apr 3 04:23:46 EDT 2000
On Fri, 31 Mar 2000 18:18:27 +0900 (JST), Christian Stolte
<stolte at fuchinobe.skk.slb.com> wrote:
>
>I'd like to web-present a file structure (=pseudo database) in different sort
>orders with info and pics, nice and webby.
>
>a. project view - split frame left: all projs to select from
> right: detailed info with short descr,
> pics etc
>b. data view - split frame left: grouped data to select from
> right: detailed info with project information
>
>I know there is Zope, but that's too much. So what about picking the files
>into a directory like list, then sort that list in different ways and
>display it with HTMLGen???
>
I would use os.listdir() to create a list of files and then sort it
the way I want it. If you have several 'levels' of subdirectories you
want to look up os.path.walk()
Using the Table class in HTMLgen you just use the list of files and
create a table which you then can insert into your HTML page using
TemplateDocument
The only example that I have found (.although I haven't look very
hard.) is the HTMLtest.py. Here you will find alot of things!
// Anders
More information about the Python-list
mailing list