import os.pathimport cherrypyclass Root:@cherrypy.exposedef index(self):return """ <html><head><title>CherryPy static test</title></head><html><body><p>Testing images from image dir</p><img src="images/today.png" width="640" height="480" border="0"></body></html>"""if __name__ == '__main__':current_dir = os.path.dirname(os.path.abspath(__file__))# Set up site-wide config first so we get a log if errors occur.cherrypy.config.update({'server.socket_host': '10.0.0.212','server.socket_port': 80, })conf = {'/images': {'tools.staticdir.on': True,'tools.staticdir.dir': os.path.join(current_dir, 'images')}}cherrypy.quickstart(Root(), '/', config=conf)
---
ir EE van Andel e...@fiwihex.nl http://www.fiwihex.nl
Fiwihex B.V. Wierdensestraat 74, NL7604BK Almelo, Netherlands
tel+31-546-491106 fax+31-546-491107