标签:
1.自己调用命令行
pyuic4
-
o codeFile.py
-
x yourUIfile.ui
2.写一个批处理,每次双击就行了,跟你的源文件放在同一文件夹下
import
os
for
root, dirs, files
in
os.walk(
‘.‘
):
for
file
in
files:
if
file
.endswith(
‘.ui‘
):
os.system(
‘pyuic4 -o %s.py -x %s‘
%
(
file
.rsplit(
‘.‘
,
1
)[
0
],
file
))
elif
file
.endswith(
‘.qrc‘
):
os.system(
‘pyrcc4 -o %s_rc.py %s‘
%
(
file
.rsplit(
‘.‘
,
1
)[
0
],
file
))
标签:
原文地址:http://www.cnblogs.com/hushaojun/p/4437491.html