I have been using PHP for years. Lately I've come across numerous forum posts stating that PHP is outdated, that modern programming languages are easier, more secure, etc. etc.
So, I decided to start learning Python. Since I'm used to using PHP, I just started building pages by uploading an .htaccess file with:
addtype text/html py
addhandler cgi-script .py
Then, my sample pages look like:
#!/usr/bin/python print "content-type: text/html\n\n" print "html tags, more stuff, etc."
This works fine. But, I came across a comment in a post that said that CGI isn't the best way to use Python. Of course, it didn't mention what is the best way.
Why is it that using CGI is not the best way to use Python? What is the alternative?
Is there some totally other way to set up a simple Python site? Is there some completely different paradigm I should be looking at outside of .htaccess and .py files?