[Doc-SIG] download size

Hernan Martinez Foffani hernanf@my-Deja.com
Sun, 26 Mar 2000 15:44:09 -0800


On Sun, 26 Mar 2000 14:01:44 I wrote:
>
>May be including a table like this in the html 
....
>I know it's more work, but with a little python script... No, don't look at me :-)

Just to follow python community spirit:

template = "<TR><TD>%s</TD><TD>%s</TD><TD><A HREF=" + \
	"http://www.python.org/doc/current/download/" + \
 	"%s>%s</A></TD><TD>%d KB</TD></TR>"

templtitle = "<TR><TD>%s</TD><TD>%s</TD><TD>%s</TD><TD>%s</TD></TR>"

download = [
	( "Acrobat", "A4", "doc-a4.pdf",  "doc-a4.pdf", 1500 ),
	( "Acrobat", "Letter", "doc-letter.pdf", "doc-letter.pdf", 1501 ),
	( "HTLM zip", "N/A", "html.zip", "html.zip", 1122 )
]

def showtable() :
    print "<TABLE>"
    print templtitle % ( "Doc Format", "Page Size", "URL", "Size" )
    for docformat in download:
        print template % docformat
    print "</TABLE>"
    
    
BTW, it almost took me more time to sketch the table with -, | and + than to sketch the script.
You'll do better, of course.

-H.


---
Hernan Martinez Foffani
hernanf@my-deja.com



--== Sent via Deja.com http://www.deja.com/ ==--
Share what you know. Learn what you don't.