Helpful Information
 
 
Category: Python Programming
Python, Sessions and MySQLab

Hi,

I was wondering if anyone knows of a site that provides Tutorials or Articles on using Python, Sessions and MySQLdb togethor (like some of the awesome PHP+MySQL ones on devshed) for web building?

After experimenting (I'm learning it, I got a fairly good book for Xmas but it doesn't go really far into using it for this purpose) with Python, I am starting to wonder why it isn't very common or why it is hard to find articles on web building with it...

I voted "no" for now. I don't think Python is suited very well for CGI programming. It lacks the speed of PHP, and not only simple speed, but also speed of development. Because PHP is targeted completely at the web environment(although they're trying to do more with it, such as PHP-GTK, which is IMO complete crap) apps can be developed very quickly. With Python it isn't that easy. I think Python has other uses which it is better at, such as embedding in a C++/Java app, or using it as a replacement for shell scripting.

Note:
I have only tried standalone Python web programming. I still have to try ASP+Python, and see if the added benefits of ASP would make Python more suitable for web programming.

For some good info about web programming with Python, check this:

Web Programming Topic Guide (http://python.org/topics/web/)

I hadn't noticed any speed difference between PERL and Python CGI at compile time, but you are right, it isn't as fast as mod_php4. But, I am still curious....

Also the Webware Application server looks interesting, might check it out...

http://webware.sourceforge.net/

EDIT:

I couldn't get webware to work (yes I followed the instructions), so If anyone else knows how to do Sessions + MySQLdb please post something...

I also voted "no" because Python, in and of itself, isn't as good a PHP for web development.

Zope (http://www.zope.org) however, is supurb for web development, once you get over the learning curve.

NOTE: Zope is written in Python and you use Python a lot writing apps to run in Zope.

I used to love PHP/MySQL for everything, but now I really love Zope.

Sure, Python doesn't have an interpreter as fast as PHP's, but it does make for faster developed, cleaner code than PHP does.

Take a look at Zope, you may be glad you did.

DISCLAIMER: I was the one who reprogrammed the DevShed engine in Zope, so I'm a bit biased. :D

Thanks, I will check Zope out.

Is Devshed going to do a better and more in depth tutorial on using Zope, Apache and MySQL?

I did notice the slightly biasedness. :)

I totally forgot about Zope. Shame on me. ;)
I'm not reallt into using Zope, but I have tried it, just to know what it was, and it seemed very good. You could even say it is one of the Python flagship products.

Well... your not wrong about the learning curve (Zope), it does take a bit. It is still a very interesting development tool. Rather slow too in some places (like start-up).

It kind of reminds me of ColdFusion in a way... only with an interface and other weird bits.

But, I think I might leave that for later (or atleast when I own my own Server) to use it for any sites/intranets I build in the near future.

I just got one Question... I use (Apache, OpenSSL, Mod_PHP 4.0.4, Mod_ASP) OpenSA 1.0.b3 (http://www.opensa.org) , how do I get them to work togethor?










privacy (GDPR)