Nothing againest mysqlDB but I had tried using it sometimes and found it little difficult to use when you left the connections open idle for sometime .<div><br></div><div>I had used PySQLPool then to solve my issues. </div>
<div><br></div><div>Give it a try, I would recommend it. </div><div><br></div><div>Thanks,</div><div>nitin <br><br><div class="gmail_quote">On Tue, Jan 25, 2011 at 8:35 PM, Matthew Roth <span dir="ltr"><<a href="mailto:mgroth86@gmail.com">mgroth86@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">On Jan 25, 4:30 am, Dennis Lee Bieber <<a href="mailto:wlfr...@ix.netcom.com">wlfr...@ix.netcom.com</a>> wrote:<br>

> On Mon, 24 Jan 2011 14:25:09 -0800 (PST), Matthew Roth<br>
> <<a href="mailto:mgrot...@gmail.com">mgrot...@gmail.com</a>> declaimed the following in<br>
> gmane.comp.python.general:<br>
><br>
><br>
><br>
> > I've explored various avenues all day to no avail. Can anyone offer a<br>
> > solution or a direction to work towards. One avenue was ignorning the<br>
> > check for posix, and having it run setup_windows, but this just brings<br>
> > in problems with _winreg(?) seeing how I have a posix version of<br>
> > python through cygwin.<br>
><br>
>         Maybe you need the development headers for MySQL?<br>
--<br>
I do believe I have them. Perhaps I need to find the correct way to<br>
point to them.<br>
I believe it is looking for the dev headers for a linux client when I<br>
am using a client for windows via cygwin.<br>
<br>
Or perhaps I should look into installing a separate linux mysql client<br>
in cygwin.<br>
I read of a similiar problem with perl, but the documentation felt a<br>
bit dated and several steps would no longer function correctly.<br>
<br>
><br>
> > Lastly, for the bonus question.<br>
> > Why MySQLdb why not something like this:<br>
> > --<br>
> > import os<br>
> > cmd = 'mysql -uroot -pxxx db -e "SELECT * FROM tblxxx;"'<br>
> > os.system(cmd)<br>
><br>
>         Passing username/password to a shell command that might be parsed by<br>
> some outside process? Security leak!<br>
--<br>
I do indeed see that. However, all my python calls will be done within<br>
my local intranet.<br>
But is this a reason to not use os module at all? fetching a<br>
dirlisting or mkdir is still<br>
a valid reason to use the os Module, correct?<br>
><br>
>         Second -- MySQL is a server model DBMS; it doesn't have to be on the<br>
> local machine.<br>
--<br>
unfortunately, for my use it does. We do have an old centOs box here,<br>
but the mysql running on that is severely outdated and so too is the<br>
python.<br>
I have been discouraged from upgrading the former, and the latter I<br>
was told only if I could do it through yum. Making an altinstall form<br>
source seems to be<br>
discouraged. Good news is I think they have decided to upgrade our<br>
development box.<br>
><br>
>         Third -- ever heard of TRANSACTIONS? How would you handle a<br>
> transaction if every SQL statement was a totally independent process?<br>
> --<br>
No. quite to my embarrassment I haven't. But this is not to say I have<br>
not used them. It sounds as if I have.<br>
But, you can put more than one sql statement into a cmdline.<br>
mysql = "mysql -uuser -ppass db -e \"SELECT CURTIME();<br>
           CREATE TABLE tempTBL (<br>
           freq INT,<br>
           x INT,<br>
           y VARCHAR(255),<br>
           PRIMARY KEY(x, y);<br>
<br>
           LOAD XML INFLE 'doc'<br>
           INTO TABLE tempTBL<br>
           ROWS IDENTIFIED BY '<line>';<br>
<br>
           INSERT INTO freqTbl(x,y,freq)<br>
           SELECT x,y,freq FROM tempTBL<br>
           ON DUPLICATE KEY UPDATE freq=tempTbl.freq+freqTbl.freq;<br>
<br>
           SELECT CURTIME();\"<br>
os.system(mysql)<br>
<br>
I haven't tested that, but I know it works at the command line.<br>
I do fully intend to use MySQLdb through python and conduct more of<br>
the processing and parsing in python. It will be a learning<br>
experience. I have a background in anthropology, not computer science.<br>
But I love learning all this, and love that my place of employment<br>
encourages me to learn this. Unfortunately with self-learning you can<br>
sometimes miss out on important concepts and still accomplish tasks.<br>
<br>
Thank you for your reply.<br>
<br>
<br>
>         Wulfraed                 Dennis Lee Bieber         AF6VN<br>
>         <a href="mailto:wlfr...@ix.netcom.com">wlfr...@ix.netcom.com</a>    <a href="HTTP://wlfraed.home.netcom.com/" target="_blank">HTTP://wlfraed.home.netcom.com/</a><br>
<font color="#888888"><br>
--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Nitin Pawar<br><br>
</div>