# eric4.compileUiFiles

Script for eric4 to compile all .ui files to Python source.

### Global Attributes

None

### Classes

None

### Functions

compileUiDir | Creates Python modules from Qt Designer .ui files in a directory or directory tree.
compileUiFiles | Compile the .ui files to Python sources.
compile_ui | Local function to compile a single .ui file.
main | The main function of the script.
pyName | Local function to create the Python source file name for the compiled .ui file.

## compileUiDir

compileUiDir(dir, recurse = False, map = None, **compileUi_args)

Creates Python modules from Qt Designer .ui files in a directory or directory tree.

Note: This function is a modified version of the one found in PyQt4.

dir
  Name of the directory to scan for files whose name ends with '.ui'. By default the generated Python module is created in the same directory ending with '.py'.
recurse
  flag indicating that any sub-directories should be scanned.
map
  an optional callable that is passed the name of the directory containing the '.ui' file and the name of the Python module that will be created. The callable should return a tuple of the name of the directory in which the Python module will be created and the (possibly modified) name of the module.
compileUi_args
  any additional keyword arguments that are passed to the compileUi() function that is called to create each Python module.

Up

## compileUiFiles

compileUiFiles()

Compile the .ui files to Python sources.

Up

## compile_ui

compile_ui(ui_dir, ui_file)

Local function to compile a single .ui file.

ui_dir
  directory containing the .ui file (string)
ui_file
  file name of the .ui file (string)

Up

## main

main(argv)

The main function of the script.

argv
  the list of command line arguments.

Up

## pyName

pyName(py_dir, py_file)

Local function to create the Python source file name for the compiled .ui file.

py_dir
  suggested name of the directory (string)
py_file
  suggested name for the compile source file (string)

Returns:
  tuple of directory name (string) and source file name (string)

Up