摘要:
Pillow模块 一、Pillow模块安装 在cmd指令框通过pip安装 pip install pillow 在pycharm中安装模块 二、操作图像 图片缩放 # 方法一 from PIL import Image img3=Image.open('002.jpg') w,h=img3.size 阅读全文
posted @ 2021-04-04 14:43
辰-月
阅读(193)
评论(0)
推荐(0)
摘要:
xml模块 新建一个命名为country.xml的文件,里面的内容如下: <data> <country name="中国"> <rank updated="yes">2</rank> <neighbor name="俄罗斯" direction="E"/> <neighbor name="印度" 阅读全文
posted @ 2021-04-04 11:36
辰-月
阅读(69)
评论(0)
推荐(0)
摘要:
datetime 模块 格式符(下表以2016年1月13日下午5:00在美国/东部时区为例) datetime模块中的date类 1.date.today():返回一个包含年月日的时间对象 from datetime import date now=date.today() print(now)#2 阅读全文
posted @ 2021-04-04 11:34
辰-月
阅读(75)
评论(0)
推荐(0)
摘要:
常用内置模块 一、OS模块补充 查看当前目录的绝对路径 os.path.abspath('.') os.path.abspath('./') os.getcwd() 拼接路径 path=os.path.join(os.path.abspath('./'),'test') print(path)#D: 阅读全文
posted @ 2021-04-04 11:30
辰-月
阅读(64)
评论(0)
推荐(0)

浙公网安备 33010602011771号