(what)
| 13 | return "-{}".format(f); |
| 14 | |
| 15 | def mysql_config(what): |
| 16 | from os import popen |
| 17 | |
| 18 | f = popen("{} --{}".format(mysql_config.path, what)) |
| 19 | data = f.read().strip().split() |
| 20 | ret = f.close() |
| 21 | if ret: |
| 22 | if ret/256: |
| 23 | data = [] |
| 24 | if ret/256 > 1: |
| 25 | raise EnvironmentError("{} not found".format(mysql_config.path)) |
| 26 | return data |
| 27 | mysql_config.path = "mysql_config" |
| 28 | |
| 29 | def get_config(): |