资源简介
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试题12套(包括选择题和
- pywin32_python3.6_64位
- python+ selenium教程
- PycURL(Windows7/Win32)Python2.7安装包 P
- 英文原版-Scientific Computing with Python
- 7.图像风格迁移 基于深度学习 pyt
- 基于Python的学生管理系统
- A Byte of Python(简明Python教程)(第
- Python实例174946
- Python 人脸识别
- Python 人事管理系统
- 15个pyqt5项目
- 基于python-flask的个人博客系统
- 计算机视觉应用开发流程
- python 调用sftp断点续传文件
- python socket游戏
- 基于Python爬虫爬取天气预报信息
- python函数编程和讲解
- Python开发的个人博客
- 基于python的三层神经网络模型搭建
- python实现自动操作windows应用
- pyqt5动态加载ui文件,动态加载背景图
- python人脸识别(opencv)
- python 绘图(方形、线条、圆形)
- python疫情卡UN管控
- python 连连看小游戏源码
- 基于PyQt5的视频播放器设计
- 一个简单的python爬虫
- csv文件行列转换python实现代码
- Python操作Mysql教程手册
评论
共有 条评论