资源简介
《PYTHON QT GUI快速编程 PYQT编程指南》源代码
代码片段和文件信息
#!/usr/bin/env python
# Copyright (c) 2007-9 Qtrac Ltd. All rights reserved.
# This program or module is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as published
# by the Free Software Foundation either version 2 of the License or
# version 3 of the License or (at your option) any later version. It is
# provided for educational purposes and is distributed in the hope that
# it will be useful but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
# the GNU General Public License for more details.
import os
import platform
import stat
import sys
import PyQt4.QtCore
__version__ = “1.0.3“
if sys.platform.startswith(“win“):
PATH = os.path.join(os.path.dirname(sys.executable)
“Lib/site-packages/PyQt4“)
else:
app = PyQt4.QtCore.QCoreApplication([])
PATH = unicode(app.applicationDirPath())
del app
PYUIC4 = os.path.join(PATH “pyuic4“) # e.g. PYUIC4 = “/usr/bin/pyuic4“
PYRCC4 = os.path.join(PATH “pyrcc4“)
PYLUPDATE4 = os.path.join(PATH “pylupdate4“)
LRELEASE = “lrelease“
if platform.system() == “Windows“:
PYUIC4 = PYUIC4.replace(“/“ “\\“) + “.bat“
PYRCC4 = PYRCC4.replace(“/“ “\\“) + “.exe“
PYLUPDATE4 = PYLUPDATE4.replace(“/“ “\\“) + “.exe“
msg = []
if not os.access(PYUIC4 os.F_OK):
msg.append(“failed to find pyuic4; tried %s“ % PYUIC4)
if not os.access(PYRCC4 os.F_OK):
msg.append(“failed to find pyrcc4; tried %s“ % PYRCC4)
if not os.access(PYLUPDATE4 os.F_OK):
msg.append(“failed to find pylupdate4; tried %s“ % PYLUPDATE4)
if msg:
print “\n“.join(msg)
print “try manually editing this program to put the correct “ + \
“paths in place“
sys.exit()
Debug = False
Verbose = False
def usage():
print “““usage: mkpyqt.py [options] [path]
Options (which can be given in any of the forms shown):
-b --build build [default]
-c --clean clean
-f --force force
-t --translate translate
-r --recurse recurse
-v --verbose verbose
-D --debug debug
path defaults to .
If executed with no arguments (or with a build argument) it does a
build i.e. it looks for all *.ui and *.qrc files and makes sure that
the corresponding ui_*.py and qrc_*.py files exist and are up-to-date.
If executed with clean deletes all ui_*.py and qrc_*.py files that have
corresponding *.ui and *.qrc files and all *.pyc and *.pyo files.
If executed with force it does a clean followed by a build.
If building and the translate option is given after building it runs
pylupdate4 on all .py and .pyw files it encounters and then runs lrelease
on all .ts files it encounters. It does not use a .pro file so the .ts
files must be created in the first place e.g. using pylupdate4 on one
of the source files and using its -ts option.
WARNING: Do not give any hand-coded files names that match ui_*.py or
qrc_*.py since these will be deleted by
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2009-11-13 09:38 《PYTHON QT GUI快速编程 PYQT编程指南》源码\
文件 4044 2008-06-27 21:54 《PYTHON QT GUI快速编程 PYQT编程指南》源码\README.txt
目录 0 2009-11-13 09:38 《PYTHON QT GUI快速编程 PYQT编程指南》源码\chap01\
文件 988 2007-06-27 15:08 《PYTHON QT GUI快速编程 PYQT编程指南》源码\chap01\answers.txt
文件 43 2007-06-30 16:01 《PYTHON QT GUI快速编程 PYQT编程指南》源码\chap01\hello.py
目录 0 2009-11-13 09:38 《PYTHON QT GUI快速编程 PYQT编程指南》源码\chap02\
文件 4751 2008-01-21 16:42 《PYTHON QT GUI快速编程 PYQT编程指南》源码\chap02\answers.py
文件 2520 2008-01-21 16:42 《PYTHON QT GUI快速编程 PYQT编程指南》源码\chap02\frange.py
文件 2479 2008-01-21 16:42 《PYTHON QT GUI快速编程 PYQT编程指南》源码\chap02\simplified.py
目录 0 2009-11-13 09:38 《PYTHON QT GUI快速编程 PYQT编程指南》源码\chap03\
文件 12695 2008-01-21 16:42 《PYTHON QT GUI快速编程 PYQT编程指南》源码\chap03\SortedDict.py
文件 0 2007-06-30 16:01 《PYTHON QT GUI快速编程 PYQT编程指南》源码\chap03\__init__.py
文件 1078 2008-01-21 16:42 《PYTHON QT GUI快速编程 PYQT编程指南》源码\chap03\balloon.py
文件 2938 2008-01-21 16:42 《PYTHON QT GUI快速编程 PYQT编程指南》源码\chap03\dimension.py
文件 3607 2008-01-21 16:42 《PYTHON QT GUI快速编程 PYQT编程指南》源码\chap03\item.py
文件 8856 2008-01-21 16:42 《PYTHON QT GUI快速编程 PYQT编程指南》源码\chap03\length.py
文件 12956 2008-01-21 16:42 《PYTHON QT GUI快速编程 PYQT编程指南》源码\chap03\ordereddict.py
文件 2645 2008-01-21 16:42 《PYTHON QT GUI快速编程 PYQT编程指南》源码\chap03\rectangle.py
文件 2840 2008-01-21 16:42 《PYTHON QT GUI快速编程 PYQT编程指南》源码\chap03\stack.py
文件 3913 2008-01-21 16:42 《PYTHON QT GUI快速编程 PYQT编程指南》源码\chap03\tribool.py
目录 0 2018-04-20 15:46 《PYTHON QT GUI快速编程 PYQT编程指南》源码\chap04\
文件 1390 2008-01-21 16:42 《PYTHON QT GUI快速编程 PYQT编程指南》源码\chap04\alert.pyw
文件 1750 2008-01-21 16:42 《PYTHON QT GUI快速编程 PYQT编程指南》源码\chap04\alert_extra.pyw
文件 1660 2008-01-21 16:42 《PYTHON QT GUI快速编程 PYQT编程指南》源码\chap04\calculate.pyw
文件 2525 2008-01-21 16:42 《PYTHON QT GUI快速编程 PYQT编程指南》源码\chap04\connections.pyw
文件 3151 2008-01-21 16:42 《PYTHON QT GUI快速编程 PYQT编程指南》源码\chap04\currency.pyw
文件 3291 2008-07-05 15:33 《PYTHON QT GUI快速编程 PYQT编程指南》源码\chap04\currency2.pyw
文件 2776 2008-07-07 23:29 《PYTHON QT GUI快速编程 PYQT编程指南》源码\chap04\interest.pyw
文件 4363 2008-01-21 16:42 《PYTHON QT GUI快速编程 PYQT编程指南》源码\chap04\signals.pyw
文件 1047 2018-04-20 16:17 《PYTHON QT GUI快速编程 PYQT编程指南》源码\chap04\新建文本文档.py
目录 0 2009-11-13 09:38 《PYTHON QT GUI快速编程 PYQT编程指南》源码\chap05\
............此处省略535个文件信息
- 上一篇:学Python的第一本书
- 下一篇:Python高級編程源代码
相关资源
- Python高級編程源代码
- 学Python的第一本书
- scrapy 爬取图片clj
- python 飞机大战
- 爬取百度图片到本地(python代码)
- python病毒(无限锁屏.py)
- python五子棋源码(控制台版本)
- Python爬虫数据分析可视化
- 网易云课堂视频(python脚本)
- 笨方法学Python
- python 画 金字塔代码
- python 画五星红旗(基于turtle)
- 坦克大战带源码(python)
- 双色球随机选号(python 脚本)
- python基础.ipynb(初等数学相关)
- python 照片人脸识别
- 恐龙快跑 游戏源码(基于pygame)
- 快速入门python培训教程.ppt(63页)
- python 重命名文件并排序
- python绘制 彩色蜂蜜窝(基于turtle)
- 012345手势识别神经网络代码
- 猫-非猫图二分类识别
- python 记录键盘按键(基于keyboard)
- python 画星星(满天星)
- python 实现 屏幕水印
- python发送gmail邮件demo
- python自动抠图(基于cv2)
- Python Libraries(python编程常用库教程)
- 模拟银行存取款.py
- python猜数字游戏
评论
共有 条评论