added script for rebuilding ui files for pyside
This commit is contained in:
parent
4c525ffa06
commit
9baa011638
16
rebuildUi.py
Normal file
16
rebuildUi.py
Normal file
@ -0,0 +1,16 @@
|
||||
import os, sys
|
||||
## run "python rebuildUi.py pyside" to rebuild all ui files for pyside
|
||||
|
||||
uic = 'pyuic4'
|
||||
if len(sys.argv) > 1 and sys.argv[1] == 'pyside':
|
||||
uic = 'pyside-uic'
|
||||
|
||||
for path, sd, files in os.walk('.'):
|
||||
for f in files:
|
||||
base, ext = os.path.splitext(f)
|
||||
if ext != '.ui':
|
||||
continue
|
||||
ui = os.path.join(path, f)
|
||||
py = os.path.join(path, base + '.py')
|
||||
os.system('%s %s > %s' % (uic, ui, py))
|
||||
print py
|
Loading…
Reference in New Issue
Block a user