One thing I have been struggling with is moving from developing in Python to utilize Python on the web. All my web is currently handled with php, mainly through easy to install scripts/cms's such as Drupal, Wordpress and Joomla. Why? Because it is easy and they do 95% of what 99% of people need. (clients are not programmers)

So looking here: http://wiki.python.org/moin/WebFrameworks I realize everything Python is web-frameworks and nothing BUT web frameworks. Everything is about the socalled Model–view–controller and what not. Why? I really need to understand WHY? As I said above 95% of what 99% of people (at least the people that come to me) I can handle with free and easy to install software. The rest I can code myself with php.

But, I realize the power of Python, and I can see how great it would be to write python for some of the websites that we build. But why would I ever start working with a heavy to use web framework that makes absolutely no sense, hard to install and takes forever to get running on our servers since the compatability with current live servers are a joke and can kill Apache 100 times over.

I am not here to fight all the Python web framework evangelists, but I would like to know what option I have to type Python into my html files. If I want to do that, can I? If so how? And dont point me to another web-framework that is "better" or "lighter" or whatever each framework is trying to brand itself as. I just want to write Python, just that, nothing more, nothing less.

That or I have completely misunderstood the whole web-framework ideology and would really like a layman terms approach to why this is so much more fantastic.

And no its not fantastic building a blog from scratch in Django when wordpress gives 1000x more functions in 1000x less time spend.

If you only want to type python in your html files, use a template engine like Mako.

I checked up on Mako and installed it. However I cant seem to find examples of Python code INSIDE the html files. It all keeps on being a reference to mako files from inside the html files.

Which is really surprising, since its the same old MVC theory all over again, and not everyone adhers to such. Do you know of any place to download sample html's with embedded Python in them? The Mako world seems a bit underdeveloped.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.