原创 sip 報錯

在程序的 __init__.py裏面添加如下代碼: import sys import os sys.path.append(os.path.realpath(os.path.dirname(__file__)))

原创 CMD 創建一個空文件

fsutil file createnew d:\a.txt 0

原创 ESC退出程序

初始化 self.connect(self,QtCore.SIGNAL('closeEmitAPP()'),QtCore.SLOT('close()')) 函數 def keyPressEvent(self,event): if

原创 pyqt 文件對話框記住上次選擇

第"5"個參數QtGui.QFileDialog.DontUseNativeDialog QtGui.QFileDialog.getOpenFileName(self,u"選擇文件",u"選擇渲染程序","",None,QtGui.QF

原创 nuke根據不同版本加載插件

在init.py裏面寫入以下內容; if nuke.NUKE_VERSION_STRING.startswith("10") nuke.pluginAddpath("XXXX") if nuke.NUKE_VERSION_STRI

原创 pyqt5 窗口文件示範

# -*- coding: utf-8 -*- from PyQt5.QtGui import * from PyQt5.QtCore import * from PyQt5.QtWidgets import * impo

原创 py 基本信息輸入框 筆記

# coding=utf8 import sys from PyQt4 import QtGui, QtCore from PyQt4.QtGui import * from PyQt4.QtCore import * class

原创 py 顯示文件樹

#coding=utf8 import os,time path = r"D:\cache\Adobe Photoshop CC 2015\AMT" def dirsTree(startPath): for root, dirs

原创 py 查看一個文件夾下的文件數量

def fileCountIn(dir): return sum([len(files) for root,dirs,files in os.walk(dir)]) print (fileCountIn(sourceDir))

原创 pyqt 文件樹

import sys from PyQt4 import * from PyQt4.QtCore import * from PyQt4.QtGui import * class Teww(QMainWindow): def _

原创 pyqt 圓形按鈕

color: rgb(137, 221, 255); background-color: rgb(37, 121, 255); border-style:none; border:1px solid #3f3f3f; padding:

原创 批量重命名工具

邊學邊做,捅咕了一天,終於弄好了.一個超級簡單的批量命名工具 鏈接:http://pan.baidu.com/s/1i5syU6T 密碼:77al

原创 python中如何對類的成員函數開啓線程

# -*- coding: utf-8 -*- import threading import thread import time class Test(object): def __init__(self):

原创 py copy file

# -*- coding: utf-8 -*- import os, sys, time, shutil start = time.time() sourceDir = r"D:\cache\Adobe Photoshop CC 20