TA wrote:
> Hi,
>
> This might be a silly question, but I was wondering how you would navigate
> backwards in a PostgreSQL cursor when the Python DB-API 2.0 allows records
> to be fetched in a forward-only manner?
This is untrue: cursor.scroll() is an optional DB-API 2.0 extension.
http://www.pyt
Use DECIMAL columns with MySQLdb-1.2.0 and Python-2.4 and you should
get values back using Python's new decimal type.
http://docs.python.org/whatsnew/node9.html
This avoids floating point inaccuracies.
--
http://mail.python.org/mailman/listinfo/python-list
Post your question here:
http://sourceforge.net/forum/forum.php?forum_id=70461
--
http://mail.python.org/mailman/listinfo/python-list
Cathy Hui wrote:
> I am trying to install MySQL-Python 0.9.1 on my Solaris 8 system. The
> system has Python 2.3.3 and Mysql 4.0.21 installed.
You're wasting your time. Use MySQL-python-1.2.0.
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> Hi. I'm trying to build MySQL-python-1.2.0 on my Linux FC2
> (with MySQL 3.23.58).
See:
https://sourceforge.net/tracker/index.php?func=detail&aid=1146226&group_id=22307&atid=374932
And also try the new 1.2.1c3 release candidate.
--
http://mail.python.org/mailman/list
[EMAIL PROTECTED] wrote:
> I'm trying to build 'MySQL-python-1.2.0' on my Linux FC2:
...
> gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -march=i386
> -mcpu=i686 -D_GNU_SOURCE -fPIC -fPIC -I/usr/include/python2.3 -c
> _mysql.c -o build/temp.linux-i686-2.3/_mysql.o -I'/usr/include/mysql'
Mage wrote:
> Andy Dustman wrote:
>
> >
> >Transactions available since 3.23.17 (June 2000)
> >
> >
> Transactions only supported on slow database types like innodb.
>
> If you ever tried it you cannot say that mysql supports transactions.
No.
> Last time
Steve Holden wrote:
> I don't know about the whole picture, but I know form evidence on
this
> group that there are PostgreSQL driver modules (the name "psycopg"
comes
> to mind, but this may be false memory) that appear to take diabolical
> liberties with DBAPI-2.0, whereas my experience with My
Buck Nuggets wrote:
> 1. mysql doesn't support transactions - one of its io layers
(innodb)
> does. If you're hoping to get your application hosted you will find
> that most mysql installations don't support innodb. And due to the
> bugs in mysql, when you attempt to create a transaction-safe t
Pierre-Frédéric Caillaud wrote:
> > MySQL is an excellent option is very well documented. It is also a
> > defacto standard for OpenSource databases.
>
> MySQL sucks for anything but very very basic stuff as it supports no
> transactions,
Transactions available since 3.23.17 (June 2000)
>
[EMAIL PROTECTED] wrote:
> Okay,
>
> I had the brilliant idea right after posting to google the newsgroups
> on this.
>
> db = MySQLdb.connect(user=database_user,passwd=database_password)
>
> db.autocommit(True) <--- One little line!
You would be better off executing db.commit() periodically (at
Tim Roberts wrote:
> In theory, using a paramstyle allows the query to be sent to the SQL
> database backend and compiled like a program. Then, successive uses
of the
> same query can be done by sending just the parameters, instead of
sending
> the entire query string to be parsed and compiled aga
Anthra Norell wrote:
> Very true!
> I could verify that cursor.execute () seems to understand "... %s
...",
> ..."string"... where print () doesn't.. I didn't know that.
> I could also verify that gumfish's ineffective insertion command
works fine
> for me. (Python 2.4, mysql-3.23.38). So it looks
The default character set used by MySQL for the connection is latin1.
If you control the server, you can configure this in the system my.cnf.
Otherwise, it is possible to set it in a local configuration file and
use the read_default_file option to connect to set it.
http://dev.mysql.com/doc/mysql/
What happens when you try to connect? Be sure to check /etc/hosts.allow
and .deny on the server, if your server is compiled with TCP wrapper
support.
--
http://mail.python.org/mailman/listinfo/python-list
Did you build your own MySQL, or did you use a pre-built version? And
what version? It's not clear if you're using 4.0 or 4.1. If
mysql_config is returning the wrong flags, then that's a bug with
MySQL.
You should be able to work around this by doing this in setup.py before
the call to setup():
e
Looking at the code, it seems that if it finds a unicode object on the
first pass (the sizing pass), it punts and returns PyUnicode_Join(self,
seq), which is the sequence from above and not necessarily the original
object (orig), and starts over. In the worst-case scenario, you have a
long sequence
There's a Windows package for MySQL-4.1.9 and Python-2.4 on SourceForge
now, thanks to Michal Zylinski.
https://sourceforge.net/project/showfiles.php?group_id=22307&package_id=15775&release_id=303257
--
http://mail.python.org/mailman/listinfo/python-list
I did some timings of ''.join( ) vs. ''.join(
) and found that generator expressions were
slightly slower, so I looked at the source code to find out why. It
turns out that the very first thing string_join(self, orig) does is:
seq = PySequence_Fast(orig, "");
thus iterating over your ge
For those of you who care, the latest stable version of MySQLdb is
1.2.0. Currently there is not a WIndows installer, however. I do not
have the toolchain to build it, either; I depend on people to donate
installers. If you have Python from the python.org packages and MySQL
from the mysql.com pac
Well, it does more than that. It converts each column from a string
(because MySQL returns all columns as strings) into the appropriate
Python type. Then you were converting all the Python types back into
strings. So it's no mystery that using the command line client is
faster, since it would take
There aren't any "issues", but there are a few things to keep in mind.
First of all, prior to 4.1, MySQL does no parameter binding, which
means that the parameters must be inserted into your SQL statements as
literals. MySQLdb will do this for you automatically, but keep in mind
that you will be c
#33
#! /usr/bin/env python
import MySQLdb
db=MySQLdb.connect(host='localhost', db='photum_0_6_2', user='root',
passwd='thkhgfgd')
c=db.cursor()
c.execute('select person from persons order by person')
for (person,) in c: # or c.fetchall() (may be more portable
It definitely looks like an access control problem; recheck your grants.
--
http://mail.python.org/mailman/listinfo/python-list
It's a pretty good tutorial, thought I would recommend you forget about
the fetchone() example. The example below demonstrates three additional
features that will make your life easier: MySQL option files, tuple
unpacking, and cursors as iterators (fourth feature: the default host
is localhost; thi
The source is for all platforms. Use the Source, Luke. If 1.1.9 does
not compile on Mac OS X, file a bug.
--
http://mail.python.org/mailman/listinfo/python-list
Gurpreet Sachdeva wrote:
> Is there any problem in library files?? Do I need to install anything
> I have installed MySQL-shared-3.23.54a-1.i386.rpm,
> MySQL-devel-5.0.2-0.i386.rpm, MySQL-client-5.0.2-0.i386.rpm,
> MySQL-server-5.0.2-0.i386.rpm
You should recheck those version numbers carefully.
27 matches
Mail list logo