reimplement MySQL-python