![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
zhongfuyu
这个作者很懒,什么都没留下…
展开
-
Python中对文件的操作
python 文件操作原创 2017-08-27 09:16:21 · 398 阅读 · 0 评论 -
ESC退出程序
# -*- coding: utf-8 -*-"""Module implementing MainWindow."""# from PyQt4.QtCore import pyqtSignature# from PyQt4.QtGui import QMainWindow# -*- coding: utf-8 -*-import time, os, sys, threading, stat原创 2017-10-20 18:54:56 · 1500 阅读 · 0 评论 -
批量重命名工具
边学边做,捅咕了一天,终于弄好了.一个超级简单的批量命名工具链接:http://pan.baidu.com/s/1kVOOH9t 密码:urkw原创 2017-10-21 21:02:24 · 343 阅读 · 0 评论 -
pyqt 文件树
import sysfrom PyQt4 import *from PyQt4 import QtGui,QtCoreclass Teww(QMainWindow): def __init__(self, parent=None): QWidget.__init__(self, parent) self.setWindowTitle("TEww")原创 2017-10-23 22:05:21 · 1136 阅读 · 0 评论 -
python windows错误代码
0操作成功完成。1功能错误。2系统找不到指定的文件。3系统找不到指定的路径。4系统无法打开文件。5拒绝访问。6句柄无效。7存储控制块被损坏。8存储空间不足,无法处理此命令。9存储控制块地址无效。10环境错误。11试图加载格式错误的程序。12访问码无效。13数据无效。14存储器不足,无法完成此操作。15系统找不到指定的驱动器。16无法删除目录。17系统无法将文件移到不转载 2017-10-15 18:16:47 · 432 阅读 · 0 评论 -
python os.stat() 和 stat模块详解
stat 系统调用时用来返回相关文件的系统状态信息的。首先我们看一下stat中有哪些属性:>>> import os>>> print os.stat("/root/python/zip.py")(33188, 2033080, 26626L, 1, 0, 0, 864, 1297653596, 1275528102, 1292892895)>>> print os.stat("/root/p转载 2017-10-15 18:29:31 · 677 阅读 · 0 评论 -
py 显示文件树
#coding=utf8import os,timepath = r"D:\cache\Adobe Photoshop CC 2015\AMT"def dirsTree(startPath): for root, dirs, files in os.walk(startPath): level = root.replace(startPath, '').count(os.转载 2017-10-24 14:35:15 · 316 阅读 · 0 评论 -
Python遍历文件树
import osfile_path=r"D:\cache\ddd"def each(file): list_file=os.listdir(file) for i in list_file: child=os.path.join(file,i) print (i)each(file_path)转载 2017-10-12 13:40:57 · 631 阅读 · 0 评论 -
py copy file
# -*- coding: utf-8 -*-import osimport timesourceDir = r"D:\cache\A"targetDir = r"D:\cache\B"copyFileCounts = 0def copyFiles(sourceDir, targetDir): global copyFileCounts print (sourceDir)原创 2017-10-10 22:15:16 · 476 阅读 · 0 评论 -
文章标题
def bt4(self): AA=nuke.getClipname("dddd","*","D:\cache\A") if os.path.isfile(AA): nuke.nodes.Read(file=AA) else: QMessageBox.information(self,"提示","请选择文件")翻译 2017-10-25 21:54:52 · 317 阅读 · 0 评论 -
py 各种库下载及参考网址
win32 https://sourceforge.net/projects/pywin32/files/pywin32/原创 2017-10-08 00:30:46 · 2278 阅读 · 0 评论 -
pyqt5 窗口文件示范
# -*- coding: utf-8 -*- from PyQt5.QtGui import * from PyQt5.QtCore import * from PyQt5.QtWidgets import *import sys class DialogOptionsWidget(QWidget): def __init__(self, parent=None):转载 2017-11-12 23:24:08 · 645 阅读 · 0 评论 -
pyqt 圆形按钮
color: rgb(137, 221, 255);background-color: rgb(37, 121, 255);border-style:none;border:1px solid #3f3f3f; padding:5px;min-height:20px;border-radius:15px;原创 2017-11-14 23:34:08 · 5195 阅读 · 0 评论 -
pyqt 文件对话框记住上次选择
第"5"个参数QtGui.QFileDialog.DontUseNativeDialogQtGui.QFileDialog.getOpenFileName(self,u"选择文件",u"选择渲染程序","",None,QtGui.QFileDialog.DontUseNativeDialog)原创 2017-11-14 23:36:15 · 1285 阅读 · 0 评论 -
pyCharm ,最新2018激活码
pyCharm最新2018激活码 点这里转载 2018-03-18 14:38:28 · 3512 阅读 · 0 评论 -
sip 报错
在 init.py里面添加如下代码: import sys import os sys.path.append(os.path.realpath(os.path.dirname(file)))原创 2017-10-27 12:53:55 · 786 阅读 · 0 评论 -
nuke py 笔记
nuke py 笔记原创 2017-08-27 09:31:42 · 1313 阅读 · 0 评论 -
PyCharm+QT Designer配置
PyQt第一次安装完后,需要修改系统变量变量名:QT_QPA_PLATFORM_PLUGIN_PATH 变量值:C:\Python34\Lib\site-packages\PyQt5\plugins原创 2017-10-07 13:01:51 · 956 阅读 · 0 评论 -
python+Eclipse+pydev环境搭建+汉化
http://www.cnblogs.com/Bonker/p/3584707.html转载 2017-10-07 18:42:13 · 492 阅读 · 0 评论 -
python中如何对类的成员函数开启线程
# -*- coding: utf-8 -*-import threadingimport threadimport timeclass Test(object): def __init__(self): # threading.Thread.__init__(self) self._sName = "machao" def process(se转载 2017-10-17 19:07:09 · 10580 阅读 · 4 评论 -
PyQt 界面控件常用积累(转载)
yQt 界面控件常用积累QtGui.QApplication(sys.argv) #QApplication 类初始化sys.exit(app.exec_()) #进入消息循环,等待窗体退出创建主界面的两种方法 1.通过继承QtGui.QMainWindow创建类 QtGui.QMainWindow.init(self) # 调用父类初始化方法2.通过继承QtGui.QWidget创建类 Qt转载 2017-10-09 13:55:50 · 1727 阅读 · 0 评论 -
py 查看一个文件夹下的文件数量
def fileCountIn(dir): return sum([len(files) for root,dirs,files in os.walk(dir)])print (fileCountIn(sourceDir))转载 2017-10-18 12:49:05 · 557 阅读 · 0 评论 -
py 基本信息输入框 笔记
# coding=utf8import sysfrom PyQt4 import QtGui, QtCorefrom PyQt4.QtGui import *from PyQt4.QtCore import *class Example(QWidget): def __init__(self): QtGui.QWidget.__init__(self)原创 2017-10-09 14:13:47 · 385 阅读 · 0 评论 -
pyqt 学习笔记
# coding=utf8import sysfrom PyQt4 import QtGui, QtCoreclass My_Button(QtGui.QWidget): def __init__(self, parent=None): QtGui.QWidget.__init__(self) self.setWindowTitle(u"关闭程序")原创 2017-10-08 21:28:05 · 343 阅读 · 0 评论 -
python密码安全性检查代码
密码安全性检查代码#低级密码要求:1. 密码由单纯的数字或字母组成2. 密码长度小于等于8位#中级密码要求:1. 密码必须由数字、字母或特殊字符(仅限:~!@#$%^&*()_=-/,.?<>;:[]{}|\)任意两种组合2. 密码长度不能低于8位#高级密码要求:1. 密码必须由数字、字母及特殊字符(仅限:~!@#$%^&*()_=-/,.?<>;:[]{}|\)三种组合2. 密码只能由字母开头3.原创 2017-10-01 22:44:02 · 5509 阅读 · 2 评论 -
easygui 写一个文本框
打开一个文本;关闭时如果发现有改动,会提示覆盖还是另存为import easygui as egimport os#文件路径file_path = eg.fileopenbox(default="*.txt")#打开文件with open(file_path)as f: #把文件读取的内容放到text中 text = f.read() # title 使用文件名原创 2017-10-03 14:37:28 · 1418 阅读 · 0 评论 -
在Ubuntu 16.04 安装python3.6 环境并设置为默认
https://www.cnblogs.com/danjawwi/p/6219707.html转载 2018-03-19 22:26:25 · 559 阅读 · 0 评论