<div><div><br> Christian,<br><br>You are certainly right. I couldn't get anything apart from "Hello world" coding in mod_python. The mod_python manual is also bit vague, not for beginners. I wonder why there aren't any good tutorials on mod_python.
<br><br>I am having a look at quixote as a developer in this list suggested. I would take a look at cherrypy if quixote is too deep for me.<br><br>Thanks for your time and the example. I believe your website is written completely in cherrypy. Working on so many projects ,nice work.
<br><br><br><br>Intercodes<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"># simple example<br>import cherrypy<br>import time<br>
<br>class MySection(object):<br> @cherrypy.expose<br> def index(self):<br> yield "<h1>Hello, world!</h1>"<br> yield "<a href='time'>Check the time</a>"<br># if you are using Python
2.3, you do the following to expose a method<br># index.exposed = True<br><br> @cherrypy.expose<br> def time(self):<br> return "<p>The current time is %s</p>" % self.get_time()<br><br>
# this method is not exposed and thus not accessible from the web<br> def get_time(self):<br> return time.ctime()<br><br># mount the class at the server root<br>cherrypy.root = MySection()<br><br>cherrypy.server.start
()<br># end of example<br><br>You can then run that script and visit <a href="http://localhost:8080/">http://localhost:8080/</a>. That<br>will call the "index" method of the MySection object mounted at the<br>server root. You can also visit
<a href="http://localhost:8080/time">http://localhost:8080/time</a>. However,<br><a href="http://localhost:8080/get_time">http://localhost:8080/get_time</a> is _not_ available to the web, because it<br>is not "exposed".
<br><br>Anyhow, CherryPy is very pythonic and flexible. Use whatever DB you<br>want (or flat files or ...). Use whatever templating language you want<br>(or just return html from your methods.<br><br>Anyhow, that's probably more info than you wanted. Good luck!
<br><br>Christian<br><a href="http://www.dowski.com">http://www.dowski.com</a><br><br>ps And "as a beginner", I would _not_ start with something like<br>mod_python ;-)<br><br><br></blockquote></div>