随笔分类 -  编程语言

摘要:#!/usr/bin/python # -*- coding: UTF-8 -*- import calendar cal = calendar.month(2016, 1) print "以下输出2016年1月份的日历:" print cal 阅读全文
posted @ 2022-01-12 14:43 mingtian是吧 阅读(28) 评论(0) 推荐(0)
摘要:import re re.findall() 查询到所有符合的 re.search re.match re.compile flags 修改正则的匹配规则 特殊符号 "." 除换行符外的任意字符 "^" 匹配开头 "$" 匹配结尾 "*" 重复前一个字符0或尽可能多次 "+" 重复前一个字符1或尽可 阅读全文
posted @ 2022-01-12 14:42 mingtian是吧 阅读(26) 评论(0) 推荐(0)
摘要:import logging https://www.cnblogs.com/yuanchenqi/articles/5732581.html https://www.cnblogs.com/qianyuliang/articles/7234217.html#top import logging # 阅读全文
posted @ 2022-01-12 14:41 mingtian是吧 阅读(23) 评论(0) 推荐(0)
摘要:import hashlib >>> ob=hashlib.md5(b'123') >>> ob.update(b'123') >>> ob.hexdigest() '4297f44b13955235245b2497399d7a93' 阅读全文
posted @ 2022-01-12 14:39 mingtian是吧 阅读(31) 评论(0) 推荐(0)
摘要:import sys sys.argv[0] sys.stdin.readline() sys.stdout.write() sys.stderr sys.exit() getdefaultencoding() sys.path ==>echo $PATH sys.platform ==>平台信息w 阅读全文
posted @ 2022-01-12 14:38 mingtian是吧 阅读(20) 评论(0) 推荐(0)
摘要:import os os.name ==>uname os.getcwd() ==>pwd os.chdir() ==>cd os.mkdir() ==>mkdir os.makedirs() ==>mkdir -p os.removedirs() ==>rmdir 只能删除空文件 os.listd 阅读全文
posted @ 2021-12-18 21:54 mingtian是吧 阅读(44) 评论(0) 推荐(0)
摘要:目录安装python3常用库 安装python3 安装python3.6(更高版本对openssl版本有要求centos7可能build失败) curl -q# https://www.python.org/ftp/python/3.6.9/Python-3.6.9.tar.xz -o Python 阅读全文
posted @ 2021-10-05 21:42 mingtian是吧 阅读(35) 评论(0) 推荐(0)