Archive for the ‘Tech’ Category
Installing MySQL for Python on Mac OSX Leopard
Author: nuri19 Jun
Yesterday, I have a sudden request from sysadmins group to make a web data presentation from their OVO data. I’ve already had some kind of template for the web apps using CodeIgniter based framework. The only “work” to do now is how to get, process and displaying the data from raw. It’s gonna be supplied via text file.
So, I came up with an idea to use Python to do collection, conversion and inserting into database
Ya ya ya, I actually I just wanna try to learn Python and use it in a production environment
So, it’s gonna be my first Python application hehehehehe.
My yukiyanagi (MB403LL/A MacBook) is already equipped with Python 2.5.1. Done with file checking, reading, parsing etc. It’s now time to put all parsed data into database.
What you need to do are:
- Download MySQL from dev.mysql.com/downloads and install it as instructed in the documentation.
- Download and extract the MySQL for Pythom from sourceforge.net. I’m using MySQL-python-1.2.2.tar.gz
- Open Terminal and go to the directory where MySQL-python-1.2.2.tar.gz was unpacked to.
- It’s better to delete build/ directory, just in case your installation might be interfered with any previous builds
- edit file site.cfg, and edit the value of mysql_config to the correct PATH where your mysql_config reside. Mine is:
# The path to mysql_config.
# Only use this if mysql_config is not on your PATH, or you have some weird
# setup that requires it.
mysql_config = /usr/local/mysql/bin/mysql_config - After that, run the build and installation script.
python setup.py build
python setup.py install
During “python setup.py build”, you might have some problem here like I did. It seems that there is an extra ‘mysql’ in the path that the shared object looks for the .dylib. You may get an error like this:
ImportError: dlopen(./_mysql.so, 2): Library not loaded: /usr/local/mysql/lib/mysql/libmysqlclient_r.15.dylib
Referenced from: ./_mysql.so
Reason: image not found
The solution is by making a symlink from /usr/local/mysql/lib to /usr/local/mysql/lib/mysql
cd /usr/local/mysql/lib
ln -s /usr/local/mysql/lib mysql
Another error which might be occured is gcc related like the picture below:

Line 47 of /usr/local/mysql/include/mysql.h is:
#include <sys/types.h>
Line 93 (and 93) of /usr/include/sys/types.h is:
typedef unsigned short ushort; /* Sys V compatibility */
typedef unsigned int uint; /* Sys V compatibility */
All you need to do is comment those 2 lines (dont forget to make the backup first)
and do the “python setup.py build”.
Voila! Everything will be running well.
Howto: Setup Huawei E220 HSDPA USB Modem with Leopard
Author: nuri21 May
In my previous post, I wrote that I was having trouble to get ZTE MF622 work on my Leopard. Not solved yet until now.
Today, Derry was kindly enough to lend me his Huawei E220 HSDPA Modem. It’s Telkomsel Flash modem package but already been unlocked. So, I can use any SIM card from any available GSM operator. But unfortunately, the E220 driver for Mac from Telkomsel is not working on Leopard. So, I need to google to find the suitable driver for that.
So, how to install Huawei E220 HSDPA USB modem on Mac OSX Leopard:
IndosatM2 ZTE MF622 driver on Leopard = problem?
Author: nuri19 May
Anyone having this kind of problem?
I have a ZTE MF622 USB HSDPA card (not mine actually), provider is IndosatM2. Try to install the driver downloaded from IndosatM2 download page. But after trying and trying, I got no luck to make it work …. *sigh*
Some friends said that ZTE MF622 is SUX for Leopard and Linux, and i think they’re right about that… *pats* Belutz
Anyone could help? Indosat ppl?
I think I need to borrow Huawei E220 to test on my Mac
Telkomsel Prepaid Blackberry Internet Service
Author: nuri16 May
As I promised regarding to Telkomsel’s new service Prepaid Blackberry Internet Service, these are the information I’ve got
Features:
- Tariff Rp.180K/30 days
- Unlimited Access for BlackBerry.net APN
- BlackBerry.net APN can be used for send/receive emails, browsing, IM, etc if subscribers using BlackBerry Handheld
- BlackBerry.net APN can be used for send/received emails if subscribers using BlackBerry Connect device.
- Support 10 POP3/IMAP4 email accounts + 1 telkomsel.blackberry.com email account
- Support BlackBerry Connect (Nokia, Sony Ericsson, Dopod, HTC, Motorola, etc)
- Self Activation by Subscribers via SMS
Registration:
- Send SMS BB<Space>REG to 333 to request for activation
- For confirm the activation, subscribers must send BB<space>ON to 333, It will activate the service on subscriber’s SIM Card
- Subscribers will be charged Rp.350,-/SMS for send to 333
- After that, restart the handset
- And register PIN, IMEI, & Email accounts on http://telkomsel.blackberry.com or via email setting on BlackBerry HandHeld
Unregistration:
- Send SMS BB<Space>UNREG to 333 to request for deactivation
- For confirm the deactivation, subscribers must send BB<space>OFF to 333, It will deactivate the service on subscriber’s SIM Card
- Subscribers will be charged Rp.350,-/SMS for send to 333
Blackberry Internet Service
Author: nuri15 May
Yap, it’s officially launched today
I’m still gathering information about the pricing etc
I’ll update this post later
Ya ya ya, the picture was taken only with Nokia N73 800k pixel mode








