Source

txMysql / bin / tmysqlc

#!/usr/bin/env python
# -*- mode: python -*-
"""tmysqlc - twisted mysql client

"""

# standard lib
import sys

# 3rd party
from twisted.python import filepath
from twisted.internet import reactor

# 1st party
from txmysql import protocol
from txmysql import settings


def shutdown(_):
    reactor.stop()


factory = protocol.MysqlProtocolFactory(
    settings.USERNAME,
    settings.PASSWORD
)
d = factory.getDeferred()
d.addBoth(shutdown)



reactor.connectTCP(settings.HOSTNAME, settings.PORT, factory)
reactor.run()