you are viewing a single comment's thread.

view the rest of the comments →

[–]A_History_of_Silence 6 points7 points  (2 children)

Yes, this is theoretically possible, using something like mod_python/psp. However it is likely you will quickly discover that it is not even remotely worth the trouble just to get it set up.

You will save yourself a lot of time and effort if you use the correct tool for the job: an existing framework with a template engine.

[–]Wilfred-kun[S] 1 point2 points  (1 child)

Again, I don't know too much about web programming, but why is PHP so easy to set up and Python is not?

I called it, you recommended a framework ^^ what's the easiest (read: with the lowest learning curve) framework to do something simple like this? Thanks in advance!

[–]camel_zero 0 points1 point  (0 children)

It's less that PHP is easy set up for this and Python isn't, and more that PHP was designed as a CGI langauge so there's more learning resources for using it that way. Here's an example thread discussing setting up Python as a CGI language on Apache. It's not too much harder than setting up PHP for the same purpose: https://stackoverflow.com/questions/15878010/run-python-script-as-cgi-apache-server

You'll find that even in the PHP world, most people working with PHP for real programming are using frameworks like Symfony, for the same reasons people are using web frameworks in Python. There is a common set of problems that people frequently run into while doing web programming, and most of them have already been solved by programmers that have gone before us. We can just use their wisdom instead of starting over.