mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-16 00:03:12 -04:00
pep8 --ignore=E111,E128,E201,E202,E203,E211,E221,E222,E225,E226,E227,E231,E241,E261,E265,E272,E302,E303,E501,E701 \ --exclude="ui_*.py,debian/*,python/ext-libs/*" \ .
25 lines
574 B
Python
25 lines
574 B
Python
import os
|
|
import subprocess
|
|
|
|
def convertUiFile(f):
|
|
|
|
command = ["pyuic4.bat", f, "-o", "ui_" + os.path.splitext(f)[0] + ".py"]
|
|
|
|
proc = subprocess.Popen(
|
|
command,
|
|
shell=True,
|
|
stdout=subprocess.PIPE,
|
|
stdin=open(os.devnull),
|
|
stderr=subprocess.STDOUT,
|
|
universal_newlines=True,
|
|
).stdout
|
|
for line in iter(proc.readline, ''):
|
|
pass
|
|
|
|
|
|
if __name__ == '__main__':
|
|
folder = "."
|
|
for descriptionFile in os.listdir(folder):
|
|
if descriptionFile.endswith('ui'):
|
|
convertUiFile(descriptionFile)
|