摘要:
归档管理:tar 计算机中的数据经常需要备份,tar是Unix/Linux中最常用的备份工具,此命令可以把一系列文件归档到一个大文件中,也可以把档案文件解开以恢复数据。 tar使用格式 tar [参数] 打包文件名 文件 tar命令很特殊,其参数前面可以使用“-”,也可以不使用。 9. 文件压缩解压 阅读全文
摘要:
修饰符 描述 re.I 使匹配对大小写不敏感 re.L 做本地化识别(locale-aware)匹配 re.M 多行匹配,影响 ^ 和 $ re.S 使 . 匹配包括换行在内的所有字符 re.U 根据Unicode字符集解析字符。这个标志影响 \w, \W, \b, \B. re.X 该标志通过给予你更灵活的格式以便你将正则表达式写得更易于理解。 ... 阅读全文
摘要:
# Informational. 100: ('continue',), 101: ('switching_protocols',), 102: ('processing',), 103: ('checkpoint',), 122: ('uri_too_long', 'request_uri_too_long'), 200: ('ok', 'okay', 'all_ok', 'all_okay'... 阅读全文
摘要:
# -*- coding: utf-8 -*- from __future__ import unicode_literals from MyQR import myqr import os pic = "ooo.gif" # 背景图片的名称 pic_ = "二维码" + pic #生成后二维码的名称 words = "https://www.baidu.com/" # 网址(前面要加http... 阅读全文
摘要:
# import qrcode # img=qrcode.make("www.baidu.com") # img.save("test.png") """ 生成带logo的二维码 """ import qrcode from PIL import Image import os def gen_qrcode(string, path, logo=""): """ 生成... 阅读全文
摘要:
import os BASE_PATH =os.path.split(os.path.split(os.path.dirname(os.path.abspath(__file__)))[0])[0]#os.path.split 仅把最后一个\符号作为分隔符 阅读全文
摘要:
# # j = 1 # while j < 10: # i = 1 # while i <= j: # print('{}*{}={}'.format(i, j, i * j), end='\t') # i += 1 # print() # j += 1 for i in range(1, 10): for j in ra... 阅读全文
摘要:
today = int(input("请输入今天是星期几:")) if today==1: print('周一:跑步 ') elif today==2: print('周二:游泳 ') elif today==3: print('周三:健身房') elif today==4: print('周四:动感单车') elif today==5: print('... 阅读全文
摘要:
请输入半径r,最多支持两位小数: 5.6666半径未5.67,的圆的面积s = 100.827半径为5.6666,的圆的面积s = 100.8265164584 阅读全文
摘要:
from openpyxl import Workbook '''写excel from openpyxl.compat import range from openpyxl.utils import get_column_letter wb = Workbook() dest_filename = 'empty_book.xlsx' ws1 = wb.active ws1.title = ... 阅读全文