I recently had a three hour head banging off of wall session getting Python to play nicely with MySQL. I was getting the following error: File “/Library/Python/2.6/site-packages/Django-1.3-py2.6.egg/django/db/backends/mysql/base.py”, line 14, in raise ImproperlyConfigured(“Error loading MySQLdb module: %s” % e) django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: dlopen(/Users/eamonnfaherty/.python-eggs/MySQL_python-1.2.3-py2.6-macosx-10.6-universal.egg-tmp/_mysql.so, 2): no suitable image found. Did find: /Users/eamonnfaherty/.python-eggs/MySQL_python-1.2.3-py2.6-macosx-10.6-universal.egg-tmp/_mysql.so: mach-o, but wrong architecture This was a complete mix up between 32bit and 64bit Python libraries working together with MySQL. To fix it I put the following in my .profile file export PATH=$PATH:/usr/local/mysql/bin export CC=”gcc-4.0″ export CXX=”g++-4.0″ export PYTHONPATH=”/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/” export DYLD_LIBRARY_PATH=/usr/local/mysql/lib/ export ARCHFLAGS=’-arch i386′ export VERSIONER_PYTHON_PREFER_32_BIT=yes After addingRead more
I am looking at pyparsing and it looks very good. I am looking at extending the grammar included in ASDox to include information about methods. I am not sure this is worth while. I have two possible approaches to the CheckstyleAS3 project: 1) I can build up a complete grammar and make thus contribute to ASDox and the grammar project forking off of that. This will make my work much harder now but will make the rule matching easier. 2) I can not build up the grammar and use regular expressions for the rule matching. This will make the currentRead more
I am learning Python at the moment so I use the asDox project to help with my new project, CheckstyleAS3. I am TDD’ing my project and learning how to write OO Python code. Python seems very good. I am not sure on class methods all needing a self parameter and having to qualify all method calls with self, seems like custom objects were a bit of an after thought.