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. |