官术网_书友最值得收藏!

Room to grow

While the projection specification that we set for ourselves is fulfilled, there is more that can be done on this program to make it more serviceable in a production environment. Some areas that you might look at for further practice are:

  • Set the host, database, username, and password from command-line options. You will naturally need to error-check each of them. You will probably want to use the getpass module to accept the password in production environments.
  • Set an option for the column variable and testing whether that column exists in the chosen database.
  • Set up error-checking for the results itself.

The world database has a few other tables besides City. Can you aggregate their records in Python without using a JOIN statement?

主站蜘蛛池模板: 中方县| 泉州市| 丘北县| 凤山县| 嘉黎县| 防城港市| 陕西省| 定襄县| 镇宁| 沿河| 渭南市| 英超| 金昌市| 墨玉县| 桃江县| 信丰县| 浮山县| 田林县| 宁安市| 白沙| 鄂托克旗| 商洛市| 墨江| 余干县| 甘孜| 六安市| 凉山| 武宁县| 九龙城区| 石首市| 通渭县| 彭泽县| 广水市| 杂多县| 于都县| 奉化市| 呈贡县| 娄烦县| 鱼台县| 弥渡县| 克拉玛依市|