Yet Another Python Web Programming Question

and-google at doxdesk.com and-google at doxdesk.com
Sat Jul 9 21:36:13 EDT 2005


Daniel Bickett wrote:

> Python using CGI, for example, was enough for him until he started
> getting 500 errors that he wasn't sure how to fix.

Every time you mention web applications on this list, there will
necessarily be a flood of My Favourite Framework Is X posts.

But you* sound like you don't want a framework to take over the
architecture of your app and tell you what to do. And, indeed, you
don't need to do that. There are plenty of standalone modules you can
use - even ones that are masquerading as part of a framework.

I personally use my own input-stage and templating modules, along with
many others, over standard CGI, and only bother moving to a faster
server interface which can support DB connection pooling (such as
mod_python) if it's actually necessary - which is, surprisingly, not
that often. Hopefully if WSGI catches on we will have a better
interface available as standard in the future.

Not quite sure what 500 Errors you're getting, but usually 500s are
caused by unhandled exceptions, which Apache doesn't display the
traceback from (for security reasons). Bang the cgitb module in there
and you should be able to diagnose problems more easily.

> He is also interested in some opinions on the best/most carefree way
> of interfacing with MySQL databases.

MySQLdb works fine for me:

  http://sourceforge.net/projects/mysql-python/

(* - er, I mean, Hypothetical. But Hypothetical is a girl's name!)

-- 
Andrew Clover
mailto:and at doxdesk.com
http://www.doxdesk.com/




More information about the Python-list mailing list