[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Leopard and MySQL

arbo.newmedia

3/5/2008 10:46:00 AM

Hi,

can anyone help me with MySQL.
I've got Mac OSX Leopard and I'm trying to install MySQLdb for
Python.

I'm running build and it goes withous any errors and install.

But when I'm typing : import MySQLdb in IDLE I've got this:

Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import MySQLdb
File "build/bdist.macosx-10.3-fat/egg/MySQLdb/__init__.py", line 19,
in <module>
File "build/bdist.macosx-10.3-fat/egg/_mysql.py", line 7, in
<module>
File "build/bdist.macosx-10.3-fat/egg/_mysql.py", line 6, in
__bootstrap__
ImportError: dlopen(/Users/lisek/.python-eggs/MySQL_python-1.2.2-py2.5-
macosx-10.3-fat.egg-tmp/_mysql.so, 2): Symbol not found:
_mysql_affected_rows
Referenced from: /Users/lisek/.python-eggs/MySQL_python-1.2.2-py2.5-
macosx-10.3-fat.egg-tmp/_mysql.so
Expected in: dynamic lookup

And I don't know what is wrong... ;/
3 Answers

martin.laloux

3/5/2008 12:40:00 PM

0

arbo.newmedia

3/5/2008 2:38:00 PM

0

On 5 Mar, 13:40, martin.lal...@gmail.com wrote:
> There is a macpython list that you can consult athttp://www.nabble.com/Python---pythonmac-sig-.... When you
> search for your problemhttp://www.nabble.com/forum/Search.jtp?forum=2970&local=y&que...
>
> you have the solutionhttp://www.nickshanny.com/2007/10/os-x-105-python-and-my...

Thanks a lot.

Joe User

3/24/2010 5:36:00 PM

0

"zxcv" <zxcvnosend@yahoo.com> wrote:
On Mar 24, 12:31 pm, "Joe User" <joeu2004> wrote:
> > Try:
> > If Round(inval,2) = inval Then
[....]
> Thanks for the input but I need to do this in VBA
> as I have no control over the input and cannot put
> any formulas in the sheet. Someone else enters the
> data and then another person hits a button that I
> created.

I don't understand your comment. What I wrote is for VBA, and it is
intended to deal with exactly the situation that you describe. I think you
misunderstand my comments. Perhaps you should just give it a try.

PS: Sorry, I wrote "=" where you wanted "<>". That's a simple change, heh?


----- original message -----

"zxcv" <zxcvnosend@yahoo.com> wrote in message
news:6d74dc36-1fae-4269-8bba-dd366ae0b776@g28g2000yqh.googlegroups.com...
On Mar 24, 12:31 pm, "Joe User" <joeu2004> wrote:
> "zxcv" <zxcvnos...@yahoo.com> wrote:
> > I need to do some input validation so to check if a
> > value has no more than 2 decimal digits. So 14.12
> > is valid but 14.123 is not.
>
> Try:
>
> If Round(inval,2) = inval Then
>
> Normally, I would opt for WorksheetFunction.Round or even
> Evaluate("round(...)") instead of the VB Round function. There are
> functional differences. In this case, I do not think it makes a
> difference.
> Nevertheless, you might want to use one of those alternatives instead,
> just
> to be sure.
>
> ----- original message -----
>
> "zxcv" <zxcvnos...@yahoo.com> wrote in message
>
> news:3466ddcc-9050-4873-9377-bcaee5b6517e@z3g2000yqz.googlegroups.com...
>
> >I need to do some input validation so to check if a value has no more
> > than 2 decimal digits. So 14.12 is valid but 14.123 is not.
>
> > I have tried doing a check like this:
>
> > If Int(inval * 100) <> inval * 100 Then
>
> > but this gets a rounding error with certain values like 2.22. If I
> > subtract one side above from the other I get a difference on the order
> > of 10^-21.
>
> > So I tried rounding the numbers to do a test like this:
>
> > If Round(Int(inval * 100), 10) <> Round(inval * 100, 10) Then
>
> > and this does something weird like rounding Round(Int(0.29 * 100), 10)
> > to 28.
>
> > Is there some simpler way to check that a number does not have too
> > many decimal digits?

Thanks for the input but I need to do this in VBA as I have no control
over the input and cannot put any formulas in the sheet. Someone else
enters the data and then another person hits a button that I created.