def define_db(conn, db, host, port, user, passwd):
 dal = 'db = DAL("mssql4://%s:%s@%s:%s/%s", pool_size=10, decode_credentials=True)'
 print (dal % (user.replace('@', '%40').replace(':', '%3A'), passwd.replace('@', '%40').replace(':', '%3A'), host, port, db))
 print
 print 'migrate = False'
 print
 for table in get_tables(conn):
  define_table(conn, table)

def define_db ( conn , db , host , port , user , passwd ) : dal = 'db = DAL("mssql4://%s:%s@%s:%s/%s", pool_size=10, decode_credentials=True)' print ( dal % ( user . replace ( '@' , '%40' ) . replace ( ':' , '%3A' ) , passwd . replace ( '@' , '%40' ) . replace ( ':' , '%3A' ) , host , port , db ) ) print print 'migrate = False' print for table in get_tables ( conn ) : define_table ( conn , table )
output database definition .