Personal tools
You are here: Home diverse filer til download mm. tabel.py
Document Actions

tabel.py

by admin last modified 2007-07-05 09:39

http://www.eksperten.dk/spm/778800

Click here to get the file

Size 1 kB - File type text/python-source

File contents

#!/usr/bin/env python2.4
# -*- coding: UTF-8 -*-

import cherrypy

class tabel:

    def tabel( self ):
        return "<table>\n<tr>"+"</tr>\n<tr>".join( [ "".join( [ "<td>%d</td>" % ( x*z ) for x in range( 1,11 ) ] )  for z in range( 1,11 ) ] ) + "</tr></table>"

    def index(self):
        data = self.tabel()
        return """
        <html>
            <head>
                <style>
                    td { text-align: right; width: 10%%; }
                </style>
            </head>
            <p><a href="http://www.databassen.dk:8090/bauerdata/tabel">Se kildekode</a></p>
            <pre>
print "\\n".join(["".join([ "%%4d" %% (x*z) for x in range(1,11)])  for z in range(1,11)])
            </pre>
            %(data)s
        </html>
        """ % vars()
    index.exposed = True


cherrypy.root = tabel()

if __name__ == '__main__':
    cherrypy.config.update(file = 'tabel.conf')
    cherrypy.server.start()
« May 2012 »
Su Mo Tu We Th Fr Sa
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
Chat Rooms
CMS ?

Sparer man tid og penge på Plone

ja
nej
ved ikke

Dyrk motion

Trim ballerup

 

Powered by Plone, the Open Source Content Management System