[Twisted-web] dynamic nevow example-listing

Siegmund Fuehringer sifu-twisted at 0xx0.net
Tue Nov 16 08:41:37 MST 2004

On Tue, Nov 16, 2004 at 01:09:11PM +0100, Valentino Volonghi wrote:
> On Tue, 16 Nov 2004 18:20:11 +0800, Siegmund Fuehringer
> <sifu-twisted at 0xx0.net> wrote:
> > hi all!
> > 
> > i like the idea of nevow example listing that was written a few
> > hours ago. it would be cool to just run a livedemo of the examples
> > somewhere like divmod.org/nevow.com. :)
> > 
> > but what about implementing it in a more dynamic way like:
> > http://www.sifu.info/exampleBrowser.tgz
> > than there is no need to always edit the index.html file when you add
> > a new one.
> > it would be necessary though to place every example in its own directory
> > (would be nice anyways to see which files belongs to which examples) and
> > add a __init__.py with a litte metadata. a little docu for each example
> > would probably also not hurt too much :)
> > 
> > the example implementation above is just very a crude hack (will not
> > even run on windows), because i did not want to invest hours before
> > i know what you think about it.
> -1
> This would require to add unnecessary stuff to each example, making
> every user think that they need that unnecessary stuff to write new
> code.

thats true... "every" user could think that they need to add an 
__init__.py :)

> I can't see anything really bad in adding 2 lines in a file for a new example.
> Although I agree it's not beautiful, It's the least intrusive for each example.

that is true too...

and a really don't mind if it stays like it is now.

just one more comment:
as it is at the moment, we need to have all live examples in one 
directory, and that makes it hard to see at one glance, what files 
belongs to one example. and i also hoped to see more complicated 
examples with some sort of minitutorials to emerge.

and as soon as we put an example in a subdir, we would need 
a __init__.py anyways and also some os.chdir hacks in the example.tac to 
make filetemplates work.

bye bye - sifu

> IMHO at least.
> -- 
> Valentino Volonghi aka Dialtone
> Now running FreeBSD 5.3-beta6
> Blog: http://vvolonghi.blogspot.com
> Home Page: http://xoomer.virgilio.it/dialtone/
> _______________________________________________
> Twisted-web mailing list
> Twisted-web at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web

More information about the Twisted-web mailing list