[TxMt] SQL Problems

Matthew Anderson manders2k.lists at gmail.com
Wed Oct 18 22:22:32 UTC 2006


I don't have this bundle installed.

If you look at the tableBrowser.py file in the bundle editor, what  
does the first line say?

If it says "#!/usr/bin/python", this is hard coding the Apple- 
packaged version into the script.

You'll want it to instead say something like:

   #!/usr/local/bin/python
or
   #!/usr/local/bin/python2.4
or (my favorite):
   #!/usr/bin/env python

The last one, I believe, will execute whichever version of python is  
found first in your path.  In my case, that would be "/usr/local/bin/ 
python" which is the same as "/usr/local/bin/python2.4".


On Oct 18, 2006, at 4:11 PM, Jasper van der Meulen wrote:

> Updated to 2.4.3 and seperalty downloaded -> installed the MySQLdb
> Then a reboot
> then i did:
> laptop:~ jasper$ python
> Python 2.4.3 (#1, Apr  7 2006, 10:54:33)
> [GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import MySQLdb
> >>>
>
> So it didn't give any error .. but from Textmate it's still the same.
>
> Then i extracted the content of the package en copied it to the / 
> Applications/Apps/TextMate.app/Contents/SharedSupport/Bundles/ 
> SQL.tmbundle/Support/bin
>
> fired textmate again, but still the same error.
>
>
> On 18-okt-2006, at 21:47, Matthew Anderson wrote:
>
>> I don't think that MySQLdb is installed on the default build of  
>> python that ships with OS X.  If:
>>
>>   > python
>>   ...
>>   >>> import MySQLdb
>>
>> throws an ImportError exception, it's probably not installed.
>>
>> I bet it's pretty easy to build the module yourself, I think the  
>> project page is [1].  I haven't done it, but it's very likely just  
>> un-tar it, and do a "sudo python setup.py install".
>>
>> A newer version of Python (2.4.3) and MySQLdb are both nicely  
>> packaged for the Mac at [2].  I don't think you can use the nice  
>> packaged version of MySQLdb without installing the Python 2.4  
>> package as well (though I've never tried).
>>
>> There isn't any reason *not* to install the newer python though,  
>> unless you make use the proprietary Apple python extensions that  
>> tie into the Cocoa libraries.  Even if you do, you can still call  
>> up the Apple packaged python with the shell command "python2.3".
>>
>> [1] http://sourceforge.net/projects/mysql-python
>> [2] http://pythonmac.org/packages/py24-fat/index.html
>>
>> On Oct 18, 2006, at 12:17 PM, Jasper van der Meulen wrote:
>>
>>> I don;t know why ..
>>> but it doesn't look installed.
>>>
>>> if i do
>>> python ./tableBrowser.py --server=mysql
>>> in the SQL.tmbundle/Support/bin
>>> It returns the error:
>>> MySQLdb module is not installed
>>> Traceback (most recent call last):
>>>   File "./tableBrowser.py", line 284, in ?
>>>
>>> ps: i'm on a Intel
>>>
>>>
>>> On 28-aug-2006, at 22:33, Mark Lacas wrote:
>>>
>>>> Hmmm,
>>>>   Any idea why MySQLdb isn't working from TextMate then?
>>>> I ran all the MySQL tests that came with the module and they  
>>>> passed.
>>>> ml
>>>>
>>>> On Aug 28, 2006, at 1:16 PM, Derek Belrose wrote:
>>>>
>>>>> Mark Lacas wrote:
>>>>>> I note that the first line of tablebrowser.py is:
>>>>>> #!/usr/bin/env python
>>>>>>
>>>>>> My python is at:
>>>>>> /usr/bin/python
>>>>> #!/usr/bin/env python will work at that location because env  
>>>>> returns the
>>>>> location that it finds the binary "python" at.
>>>>> In your case it will return "/usr/bin/python"
>>>>>
>>>>> -Derek
>>>>>
>>>>> __________________________________________________________________ 
>>>>> ____
>>>>> For new threads USE THIS: textmate at lists.macromates.com
>>>>> (threading gets destroyed and the universe will collapse if you  
>>>>> don't)
>>>>> http://lists.macromates.com/mailman/listinfo/textmate
>>>>>
>>>>
>>>>
>>>> ___________________________________________________________________ 
>>>> ___
>>>> For new threads USE THIS: textmate at lists.macromates.com
>>>> (threading gets destroyed and the universe will collapse if you  
>>>> don't)
>>>> http://lists.macromates.com/mailman/listinfo/textmate
>>>
>>>
>>> ____________________________________________________________________ 
>>> __
>>> For new threads USE THIS: textmate at lists.macromates.com
>>> (threading gets destroyed and the universe will collapse if you  
>>> don't)
>>> http://lists.macromates.com/mailman/listinfo/textmate
>>
>> --
>>  Matt Anderson
>>
>>
>>
>> _____________________________________________________________________ 
>> _
>> For new threads USE THIS: textmate at lists.macromates.com
>> (threading gets destroyed and the universe will collapse if you  
>> don't)
>> http://lists.macromates.com/mailman/listinfo/textmate
>
>
> ______________________________________________________________________
> For new threads USE THIS: textmate at lists.macromates.com
> (threading gets destroyed and the universe will collapse if you don't)
> http://lists.macromates.com/mailman/listinfo/textmate

--
  Matt Anderson





More information about the textmate mailing list