[Tutor] databases

2011-09-10 Thread Alejandro Companioni

On Sep 10, 2011, at 6:15 PM, tutor-requ...@python.org wrote:

> You might look at http://www.sqlalchemy.org/, since it works with most 
> databases. However if you are new on databases, I think you should start 
> learning databases basics, choose a database management system (DBMS) 
> that fit your needs and learn as much as you can about that specific 
> DBMS. Then you can use SQLAlchemy or specific packagas (MySQL-Python, 
> PyGreSQL,...) to acces to that DBMS. In addition if you are going to use 
> frameworks, most of them already have their own tools for DB manipulation.
> 

Just wanted to chime in, because I wish someone had told me this sooner, but if 
you're using a Mac, try to steer clear of mysql-python. Setting it up on a Mac 
is absolutely infuriating.

If your databases are MySQL-based and you're using a Mac, I'd recommend setting 
up a Linux VM to access them with Python (or not using Python at all). Good 
luck!

-Alejandro___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] databases

2011-09-10 Thread Alejandro Companioni

On Sep 10, 2011, at 9:29 PM, tutor-requ...@python.org wrote:

> I've never used MySql on a Mac but I'm curious why it should be so 
> difficult.
> 
> MacOS is just BSD Unix under the GUI so why would be any different
> to any other Unix type system? What were the problems that you encountered?

Hey Alan,

I had the same thoughts at first: OS X is just BSD! This can't be too different 
from a Linux installation, right?

There are a number of problems with mysql-python--chiefly its poor maintenance. 
I'll link to a nine (!) step guide on installing mysql-python on Mac as an 
example:

http://friendlybit.com/tutorial/install-mysql-python-on-mac-os-x-leopard/

At Step 9 the author suggests using setuptools even though it will fail, and 
you'd actually have to patch a (old, well-documented) bug yourself. 

I wish I had found that website sooner, as installing mysql-python on my Mac 
took about 5-6 hours of constant frustration. Not a good start for a new Python 
coder, but if at least one novice skips my experience after reading this email 
then I'll be happy.

-Alejandro___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor