Python callbacks, callings with mysql table