It's a bit of a shame, because I like Python. I wish Bottle and Flask were a little easier to work with. It feels a little weird having to configure WSGI for each application. I love their minimalist approach to templating, though.
Mark On Oct 29, 2010, at 4:14 PM, Genny Engel wrote:
I think the significant attributes of most programming languages are adequately summarized here:http://james-iry.blogspot.com/2009/05/brief-incomplete-and-mostly-wrong.html ________________________________________From: Code for Libraries [code4...@listserv.nd.edu] on behalf of William Sexton [will.sex...@duke.edu]Sent: Friday, October 29, 2010 7:24 AM To: CODE4LIB@LISTSERV.ND.EDU Subject: Re: [CODE4LIB] PHP vs. Python [was: Re: Django]I use Python and Django extensively, and think they're both great. That said, also great is the very funny keynote by former flickr engineer Cal Henderson at DjangoCon 2008, titled "Why I Hate Django," which is on YouTube:http://www.youtube.com/watch?v=i6Fr65PFqfk When he showed the slide I had to admit that the statement "-".join(array)is kind of a goofy way to do that, though maybe not "unforgivable." Whenever I use join() now I chuckle a little in my mind.It's good to step back and re-evaluate your favorite tools from time- to-time. If nothing else, the ability to analyze a platform for its suitability to a need is key.Will On Oct 28, 2010, at 9:38 AM, Thomas Bennett wrote:Having used Zope (python based) as our WEB server of choice since 1998 I am urged to express my opinion that if you do choose to use python in your projects then use a service designed for python use such as Zope, Django, etal. Zope is normally run in front of Apache as a virtual host. If you are going to use python then Zope is an excellent choice forinteracting with databases and using python to massage/manipulate results if you need complex results from the database data. I like that you can write sql queries just like you might use on the command line and save it as anindividual object for use by any number of other objects.What may be a simple example to some is a tutorial quiz I wrote for the WEB. There are categories and each category has any number of questions along with the answers in the database. In the management portion, the administrator can choose which categories are active and how many questions out of the total available to pull from each category individually. When the quiz page is generated the correct number of questions are pulled randomly from the total active questions for each category, some questions can be set as inactive.There are "database connectors" for PostgreSQL, MySQL, Oracle, odbc, and others so you can choose any popular db or write your own connector. And there are python libraries written for these databases which prove veryuseful.The main thing I like about python is that the syntax pretty much forces your code to be readable by others because indention is part of the syntax ratherthan semicolons, parens, etc.I don't know PHP in detail but am learning more quickly because the University is "forcing" all departments to move to Drupal and we will be running our site on Drupal within a year probably although some administrative tasks will stillbe running on our Zope server. Thomasps: remember my point is that "IF" you choose to use python this supports itsuse with databases and scripting. On Wednesday 27 October 2010 20:49:06 you wrote:Olá, como vai? Luciano Ramalho <luci...@ramalho.org> wrote:Actually, Python is a general purpose programming language. It was not created specifically for server side scripting like PHP was. But it isvery suitable to that task.I'm not sure talking about what something used to be is as interestingas talking about what it is. Both Pyhton and PHP can share whatever moniker we choose (scripting-language, programming language, real-time, half-time, bytecoded, virtual, etc.).Not seen any scientific packages, but I've seen a few ray-tracers, although they're all demo apps and fun toys (although I think that applies to Python, too).No, that does not apply to Python. Python is widely used for hardcorescientific computing.I was referring to the ray-tracing part.It is also the most important scripting language in large scale CGI settingsYes, Python is widely used for scripting up interfaces into other more complex systems. But rarely is the core of the thing written entirelyin Python.Maybe your Google-foo is weak. :)Or maybe he's just realizing that outside of server side web scripting, PHP is just not so widely used.Absolutely, and fair enough.Having used both languages, I discovered that Python is easier formost tasks, and one reason is that the libraries that come with Pythonare extremely robust, well tested and consistent.Hmm. PHP is extremely robust and well-tested, but yes, it's not all that consistent, especially not before version 5.2+. However, things have moved on, and with release 6 around the corner things will be tighter still. Just like the first versions of Python were interesting, so was PHP's, but where the biggest problem with the evolution of PHP was the very fact that it was the most popular language for rapid web development by far.PHP is very practical for server-side web scripting, but it's libraries are unfortunately full of gotchas, traps and unexpected behaviour.There's gotchas in every language, even Python.A key reason for that is the fact that Python has always had anexception-handling mechanism while PHP has grown something like thatonly a few years agoTrue enough. But earlier versions of any language are less desirable than the latest versions, so I'm not sure this is a prevailing argument for the horribleness of PHP or any language. These thingsevolve. PHP 5.3+ and soon 6 are looking very good, indeed, but yes, wewill just have to live with a poor reputation brought on by the big number of users and the pre 5.2+ era.So, I my opinion, PHP is great at what it does best: enabling quick server-side Web scripting on almost any hosting service on Earth.I'm fairly sure you can say that because you haven't done much other kind of PHP work. :)For everything else, it is very worthwhile to learn and use a generalpurpose dynamic language such as Python, Ruby or Perl.Of course. Developers should learn many of languages, and choose wisely the language best suited to the problem at hand.Sorry for the rant. I must confess I am a founder of the BrazilianPython Association and was its first president, so you can call me aPython advocate.No bias at all, really. :) Kind regards, Alex-- ========================================== Thomas McMillan Grant Bennett Appalachian State University Operations & Systems Analyst P O Box 32026University Library Boone, North Carolina 28608(828) 262 6587 Library Systems Help Desk: https://www.library.appstate.edu/help/ ==========================================