- 博客(10)
- 收藏
- 关注
原创 Windows 安装babun教程以及没有文件扩展“.vbs”的脚本引擎的解决方案
1、下载:官网:http://babun.github.io/2、在install.bat目录下打开终端,运行install.bat /t "D:\target_folder"(D:\target_folder改为自己的安装目录)3、如果出现没有文件扩展“.vbs”的脚本引擎,解决方案转自https://blog.csdn.net/weixin_43238870/article/det...
2019-04-18 10:23:09
680
原创 Python 读写xml,合并两个xml文件object节点,并完成缩进问题
import osimport xml.etree.ElementTree as ETfrom xml.etree.ElementTree import Elementimport gflagsimport sysfrom PIL import ImageFlags = gflags.FLAGSgflags.DEFINE_string( 'source_dir1', 'C...
2019-04-15 17:17:32
4317
2
原创 pycharm 破解,简单有效,期限至2100.1.1
参考博文:https://blog.csdn.net/weixin_42534818/article/details/849294731、下载JetbrainsCrack-release-enc.jar链接:https://pan.baidu.com/s/1iVjKYiAM0F5FRhLt-8lIWQ2、下载好将文件放置在pycharm的bin目录下3、Pycharm安装目录的\b...
2019-02-16 11:00:11
1788
原创 创建txt文件,读取xml变量,并将其写进txt文件
import osimport gflagsimport sysimport xml.etree.ElementTree as ETfrom fetch_resource import get_all_img_and_xml_contained_in_root_pathFlags = gflags.FLAGSgflags.DEFINE_string( 'input_dir',...
2019-01-02 16:26:31
834
原创 读取xml数据,绘制直方图和散点图
import xml.etree.ElementTree as ETimport osimport matplotlib.pyplot as pltdef get_center(filepath,sku): num_x = [] num_y = [] for root, folder, files in os.walk(filepath): fo...
2018-11-14 16:34:09
670
原创 python批量修改图片格式
import osfrom PIL import Imagedef png_to_jpg(filepath): for root, _, files in os.walk(filepath): for file in files: if file.endswith('png'): name,g = file....
2018-11-10 17:36:29
1631
原创 多重文件路径下遍历统计后缀为png和xml的个数
# -*- coding: utf-8 -*-"""Created on Fri Sep 28 15:45:44 2018@author: mailb"""import ospath = "./test1/" # 文件路径global count_png,count_xmldef read_fileLists(path): ...
2018-09-28 10:42:19
196
原创 python 读取xml文件内容并完成修改
import osimport xml.etree.ElementTree as ETdef changesku(inputpath): listdir = os.listdir(inputpath) for file in listdir: if file.endswith('xml'): file = os.path.join(i...
2018-09-06 09:56:03
7737
1
原创 读取xml文件内容,并完成不同后缀的文件的检验
import osimport shutilimport xml.etree.ElementTree as ETpath = "D:\\实习文件\\检验信息\\f"newpath = ".\\false\\" def png_or_xml(file): if file.endswith('png'): a=file.split(".") ...
2018-08-23 14:10:34
270
原创 多级目录下寻找文件,然后将其拷贝到指定文件夹,递归。
import osimport shutilpath = "./test/" # 文件夹目录newpath = ".\\all_file\\"def read_fileLists(path): #获得当前路径下所有文件 dirList = os.listdir(path) for f in dirList: ...
2018-08-23 14:07:02
276
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人