They should be basically the same. The only difference is the embedded one is linked against the mysqld library. I would expect that one to be somewhat larger, however, and it isn't. If someone could test the embedded one and verify this this, I would appreciate it.
Note: To start the embedded server, you need to run _mysql.server_init() before creating any connections:
Help on built-in function server_init in module _mysql:
server_init(...)
Initialize embedded server. If this client is not linked against
the embedded server library, this function does nothing.
args -- sequence of command-line arguments
groups -- sequence of groups to use in defaults files
This should take a noticable amount of time to run. Also, _mysql.get_client_info() should return something that would indicate embedded server if I recall.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The embedded one is not only not somewhat larger than the non-embedded one, they contain exactly the same binary files, too. I tried the embedded egg: _mysql.server_init() returnes in no-time, and _mysql.get_client_info() just returns 5.0.27. So there definitely went something wrong.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for your replies. I've just downloaded and installed (with easy_install) MySQL_python-1.2.2-py2.5-win32.egg
It works: I'm using the Django web framework with Python 2.5 and MySQL 5 on WinXP.
Just a little question: what easy_install does apart from copying the egg file in the C:\Python25\Lib\site-packages directory?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
easy_install is a helper tool for setuptools. setuptools is an extension of distutils and adds egg packaging support (building and installing). It can also hunt down eggs just based on the package name using the Python Package Index (http://cheeseshop.python.org/pypi). ez_setup.py is a script that's designed to install setuptools for you, but since you have setuptools, you don't need it. A copy is included in the source tarball, though.
Apart from copying the .egg file to the site-packages directory there is also a line added to easy-install.pth to add the new package to the Python path.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, I have a Windows XP Pro computer with Python 2.5 and MySQL 5. As a consequence I need the latest MySQL for Python package (1.2.2).
In the download section there are three packages available for 1.2.2:
1) MySQL_python-1.2.2-py2.5-win32.egg
2) MySQL-python-1.2.2.tar.gz
3) MySQL_python_embedded-1.2.2-py2.5-win32.egg
What package should I download?
If I download the first egg file, is it sufficient that I copy the egg file in the site-packages folder or do I have to use easy-install?
Many thanks
Manuel
You still need easy_install to install the egg correctly. You can get easy_install (and learn more about eggs) here:
http://peak.telecommunity.com/DevCenter/setuptools
Don't use the embedded egg unless you want to use the embedded server. If you don't know what this means, you don't want it.
The .tar.gz is for people with a real computer with a real compiler toolchain.
All the relevant files of the two eggs seem to be the same. A diff shows only differences in PKG-INFO and SOURCES.txt. Maybe something went wrong.
They should be basically the same. The only difference is the embedded one is linked against the mysqld library. I would expect that one to be somewhat larger, however, and it isn't. If someone could test the embedded one and verify this this, I would appreciate it.
Note: To start the embedded server, you need to run _mysql.server_init() before creating any connections:
Help on built-in function server_init in module _mysql:
server_init(...)
Initialize embedded server. If this client is not linked against
the embedded server library, this function does nothing.
This should take a noticable amount of time to run. Also, _mysql.get_client_info() should return something that would indicate embedded server if I recall.
The embedded one is not only not somewhat larger than the non-embedded one, they contain exactly the same binary files, too. I tried the embedded egg: _mysql.server_init() returnes in no-time, and _mysql.get_client_info() just returns 5.0.27. So there definitely went something wrong.
I've removed the embedded egg; issue solved. :)
Anyone who really wants an embedded server probably has a working toolchain anyway.
Thanks for your replies. I've just downloaded and installed (with easy_install) MySQL_python-1.2.2-py2.5-win32.egg
It works: I'm using the Django web framework with Python 2.5 and MySQL 5 on WinXP.
Just a little question: what easy_install does apart from copying the egg file in the C:\Python25\Lib\site-packages directory?
easy_install is a helper tool for setuptools. setuptools is an extension of distutils and adds egg packaging support (building and installing). It can also hunt down eggs just based on the package name using the Python Package Index (http://cheeseshop.python.org/pypi). ez_setup.py is a script that's designed to install setuptools for you, but since you have setuptools, you don't need it. A copy is included in the source tarball, though.
http://peak.telecommunity.com/dist/ez_setup.py
Apart from copying the .egg file to the site-packages directory there is also a line added to easy-install.pth to add the new package to the Python path.