06 2021 档案
摘要:用python3实现批量将文件的编码格式进行转换; 需要指定四个参数, 1、搜索的根路径 2、文件的类型(正则表达式来处理) 3、源编码格式 4、目标编码格式 #!/usr/bin/env python # -*- coding: utf-8 -*- import os import codecs
阅读全文
摘要:在指定目录下,模糊匹配搜寻目标文件,并得出目标文件的完整路径; 采用match完全匹配; #!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import ctypes import re if __name__=="
阅读全文
摘要:参考链接:https://blog.csdn.net/df0128/article/details/82758554 如果在windows上同时安装了python2和python3, 如果想指定使用python2还是python3;可以使用如下方法:使用python2:py -2使用python3:
阅读全文
摘要:C语言版: 参考链接:https://blog.csdn.net/a_ran/article/details/40897159 cal_md5.c #include "md5.h" #include <stdio.h> #include <stdlib.h> #include <string.h>
阅读全文
摘要:通过stat函数获取文件的大小,单位bytes;无需将文件读入内存,可以计算大文件; #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include <stdio.h> int stat(const char *pa
阅读全文

浙公网安备 33010602011771号