资源简介
Rapid_GUI_Programming_with_Python_and_Qt_2008.zip, 包括英文版pdf 以及各章源码
代码片段和文件信息
#!/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
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 7292183 2018-04-12 18:36 Rapid_GUI_Programming_with_Python_and_Qt_2008.pdf
目录 0 2009-11-13 09:38 source_codes\
文件 4044 2008-06-27 21:54 source_codes\README.txt
目录 0 2009-11-13 09:38 source_codes\chap01\
文件 988 2007-06-27 15:08 source_codes\chap01\answers.txt
文件 43 2007-06-30 16:01 source_codes\chap01\hello.py
目录 0 2009-11-13 09:38 source_codes\chap02\
文件 4751 2008-01-21 16:42 source_codes\chap02\answers.py
文件 2520 2008-01-21 16:42 source_codes\chap02\frange.py
文件 2479 2008-01-21 16:42 source_codes\chap02\simplified.py
目录 0 2009-11-13 09:38 source_codes\chap03\
文件 12695 2008-01-21 16:42 source_codes\chap03\SortedDict.py
文件 0 2007-06-30 16:01 source_codes\chap03\__init__.py
文件 1078 2008-01-21 16:42 source_codes\chap03\balloon.py
文件 2938 2008-01-21 16:42 source_codes\chap03\dimension.py
文件 3607 2008-01-21 16:42 source_codes\chap03\item.py
文件 8856 2008-01-21 16:42 source_codes\chap03\length.py
文件 12956 2008-01-21 16:42 source_codes\chap03\ordereddict.py
文件 2645 2008-01-21 16:42 source_codes\chap03\rectangle.py
文件 2840 2008-01-21 16:42 source_codes\chap03\stack.py
文件 3913 2008-01-21 16:42 source_codes\chap03\tribool.py
目录 0 2009-11-13 09:38 source_codes\chap04\
文件 1390 2008-01-21 16:42 source_codes\chap04\alert.pyw
文件 1750 2008-01-21 16:42 source_codes\chap04\alert_extra.pyw
文件 1660 2008-01-21 16:42 source_codes\chap04\calculate.pyw
文件 2525 2008-01-21 16:42 source_codes\chap04\connections.pyw
文件 3151 2008-01-21 16:42 source_codes\chap04\currency.pyw
文件 3291 2008-07-05 15:33 source_codes\chap04\currency2.pyw
文件 2776 2008-07-07 23:29 source_codes\chap04\interest.pyw
文件 4363 2008-01-21 16:42 source_codes\chap04\signals.pyw
目录 0 2009-11-13 09:38 source_codes\chap05\
............此处省略534个文件信息
相关资源
- Python for ProbabilityStatisticsand Machine Le
- pandas-0.9.0.win32-py2.7.exe
- 安全帽检测detect.7z
- python语言程序设计. 梁勇. 李娜译-习题
- python+OpenCV实现全景图像拼接和图像黑
- pythoncookbook
- PYTHON自然语言处理中文版.pdf
- Python做文本情感分析之情感极性分析
- 恐龙酷跑素材、音频和源码,请自行
- imageio-2.5.0-py3-none-any.whl
- wxpython中文文档
- python easyGui中文学习文档
- python pygame实现的简单的网游服务器端
- 笨办法学Python(第四版)
- Python Cookbook(第3版)高清中文完整版
- Twisted-19.10.0-cp38-cp38-win_amd64.whl
- Python在经济计量统计和数据分析上的
- 卷积神经网络的Python实现【试读】1
- 10行Python代码实现目标检测
- Python基础教程(第3版).rar
- deep_learning_with_python.pdf(Jason Brownlee)
- Flask Web开发:基于Python的Web应用开发
- Python测试驱动开发 使用Django、Seleni
- Python实验指导书2018版
- [Python程序设计基础][李东方][电子教案
- IronPython In Action
- Apache 2.4.37_Win32
- Python数据挖掘入门与实践-中文高清晰
- 利用 Python 进行数据分析 原书第二版
- IronPython-2.7 for VS2010
评论
共有 条评论