![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
工号0303
这个作者很懒,什么都没留下…
展开
-
python多线程:小牛吃草案例
# By Chang"""Cow weight 0-5//体重标志牛 吃草次数 tag= //标志牛是否长大 eat() 吃草Rain ifRain() //判断是否下雨Grass height 0-3 //高度标志草是否成熟 isRipe //艹是否成熟 grow()// 草成长。"""import randomimport threadingimport timeclass Cow: def __init__(se原创 2020-06-19 19:41:15 · 765 阅读 · 0 评论 -
python操作数据库的简单类
#!/usr/bin/python# -*- coding: UTF-8 -*-import MySQLdbclass ClassDB: def __init__(self): self.ip = "localhost" self.user = "root" self.password = "123456" self.DBName = "TEST" self.db ...原创 2019-11-21 16:31:21 · 130 阅读 · 0 评论 -
pip install requests 安装失败解决办法
错误显示:[root@localhost test]# pip install requestsWARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.Requirement already satisfied: requ...原创 2019-11-20 11:39:11 · 6039 阅读 · 1 评论 -
django初试
安装python3:https://blog.csdn.net/lovefengruoqing/article/details/79284573安装pymysql:git clone https://github.com/PyMySQL/PyMySQLcd PyMySQL/python setup.py install安装mysql:http://www.runoob.com/mys...原创 2019-02-27 17:47:32 · 490 阅读 · 1 评论 -
一个xlsx转lua的python小工具
目录结构:xlsx文件格式:xlsxToLua.py如下:import xlrdimport osdef toLua(): pwd = "./" fileList = list(os.listdir(pwd)) # 列出文件夹下所有的目录与文件 for file in fileList: if file.find(".xlsx") >...原创 2019-07-11 16:16:38 · 472 阅读 · 0 评论 -
django runserver: sqlite3.NotSupportedError: URIs not supported
修改图中的文件再运行runserver 还爆红再运行 python manage.py migrate最后再运行ok这个bug我重装了 python3.6 python3.7 django sqlite3 libress mysql centos原创 2019-07-17 10:47:22 · 298 阅读 · 0 评论