输出日志到控制台
1 | import sys |
python操作mysql数据库进行增删查改,是经常遇到的需求,下面整理一下具体操作方法。
1、安装配置好mysql
参考《使用Docker安装配置Mysql》
2、创建一个测试用的数据库
1 | create database vkphp default character set utf8 collate utf8_general_ci; |
更多命令参考 《MySQL常用命令》
Pip is a package-management system written in Python and is used to install and manage software packages. The Python Software Foundation recommends using pip for installing Python applications and its dependencies during deployment. Pip connects to an online repository of public packages, called the Python Package Index. Pip can be configured to connect to other package repositories (local or remote), provided that they comply to Python Enhancement Proposal 503.
Most distributions of Python come with pip preinstalled. Python 2.7.9 and later (on the python2 series), and Python 3.4 and later include pip by default.
相关文档: