Utilities/uic.py

changeset 945
8cd4d08fa9f6
parent 791
9ec2ac20e54e
child 1509
c0b5e693b0eb
equal deleted inserted replaced
944:1b59c4ba121e 945:8cd4d08fa9f6
8 directory or directory tree. 8 directory or directory tree.
9 """ 9 """
10 10
11 import os 11 import os
12 12
13 def compileUiFiles(dir, recurse = False): 13
14 def compileUiFiles(dir, recurse=False):
14 """ 15 """
15 Module function to compile the .ui files of a directory tree to Python sources. 16 Module function to compile the .ui files of a directory tree to Python sources.
16 17
17 @param dir name of a directory to scan for .ui files (string) 18 @param dir name of a directory to scan for .ui files (string)
18 @param recurse flag indicating to recurse into subdirectories (boolean) 19 @param recurse flag indicating to recurse into subdirectories (boolean)
21 from PyQt4.uic import compileUiDir 22 from PyQt4.uic import compileUiDir
22 except ImportError: 23 except ImportError:
23 from PyQt4.uic import compileUi 24 from PyQt4.uic import compileUi
24 25
25 def compileUiDir(dir, recurse = False, map = None, # __IGNORE_WARNING__ 26 def compileUiDir(dir, recurse = False, map = None, # __IGNORE_WARNING__
26 **compileUi_args): 27 ** compileUi_args):
27 """ 28 """
28 Creates Python modules from Qt Designer .ui files in a directory or 29 Creates Python modules from Qt Designer .ui files in a directory or
29 directory tree. 30 directory tree.
30 31
31 Note: This function is a modified version of the one found in PyQt4. 32 Note: This function is a modified version of the one found in PyQt4.

eric ide

mercurial