Aloha,

On 12/05/2011 05:30 PM, Sareesh Sudhakaran wrote:
I have downloaded Python and PHP and have used both with Komodo Edit
IDE, side by side, and have realized I would ideally want to program in
Python. But I'm okay with PHP also - which means my choice of
programming language depends on my choice of DB. Also, PHP has OOP
'capabilities' whatever that means - so maybe I can still use it like
Python to a certain extent.

Google

is php object oriented

and you'll get plenty of somewhat relevant hits. In terms of true OO languages (like python, ruby, java...), this may be a most relevant link:

http://michaelkimsal.com/blog/php-is-not-object-oriented/

And, what he is pointing out may not be a problem for you, if mostly procedural with some object capabilities is suitable for your needs.

If you are using python to build a zope product, the ZODB is used automagically, you don't have to do anything special. To access MySQL DBs you have to add an appropriate zope product to handle queries. A search on

zope with mysql

...or vice versa returns mostly IMO embarrassingly old hits, many from old.zope.org and five to ten years old. So either the old info is still valid, or there is a lack of current information on using zope with mysql (though it is said that it is easy - where are non-stale howtos/tutorials for those who don't already know how?).

Can you point me to a resource for Python and mySQL? I've bought 'Dive
into Python' but it has no reference on how to use it with mySQL. If my
current hosting provider supports Python and mySQL, can I make it work?
They won't let me install anything on the server side though, so I can't
use any modules that aren't there already.

Look for info/howtos on Python's DB-API and the MySQLdb module.
For example:

http://pypi.python.org/pypi/MySQL-python/
http://sourceforge.net/projects/mysql-python/
http://zetcode.com/databases/mysqlpythontutorial/
http://www.devshed.com/c/a/Python/MySQL-Connectivity-With-Python/

...though sounds like you can't add such modules on your current provider's server if not there already. Myself for a project of this complexity I would want much more control of my server options than it sounds like you have. A low-cost VPS (I use linode.com), or simply use localhost until I have my options sorted out.

regards,
John S.



--
John Schinnerer - M.A., Whole Systems Design
--------------------------------------------
- Eco-Living -
Whole Systems Design Services
People - Place - Learning - Integration
j...@eco-living.net
http://eco-living.net
_______________________________________________
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to