Skip to main content

pyuiw

pre-commit.ci status python version PyPI version Documentation Status Downloads Status License pypi format Downloads Maintenance

Command Line Watcher for auto compile Qt ui to python file.

Original Tool Source from pyside2-tools pyside2uic I modified some code for customization.

Install pyuiw

pip install pyuiw

How to Use

python -m pyuiw
pyuiw

two command run the same alternatively.

demo

pyuiw -h

run this command can show up the help documentation.

usage: pyuiw [-h] [-p] [-o FILE] [-x] [-d] [-i N] [--from-imports] [-nq] [--QtModule module] [-nb] [-ni] [-ts TS] [-w WATCH [WATCH ...]] [-e EXCLUDE [EXCLUDE ...]] [-c FILE]

Qt User Interface Compiler version , running on PySide2 5.15.2.
Command Line Watcher for auto compile Qt ui to python file.

Usage Example:

optional arguments:
  -h, --help            show this help message and exit
  -p, --preview         show a preview of the UI instead of generating code
  -o FILE, --output FILE
                        write generated code to FILE instead of stdout
                        <EXP> to define a output expression (default: <${ui_dir}/${ui_name}_ui.py>)
                        ${ui_dir} - input python directory path
                        ${ui_name} - input python file name
  -x, --execute         generate extra code to test and display the class
  -d, --debug           show debug output
  -i N, --indent N      set indent width to N spaces, tab if N is 0 (default: 4)

Code generation options:
  --from-imports        generate imports relative to '.'
  -nq, --no-useQt       ignore Qt.py module for Qt compat
  --QtModule module     customize import Qt module name (default: Qt) | only work in --no-useQt flag set
  -nb, --no-black       ignore black format code
  -ni, --no-isort       ignore isort format code
  -ts TS, --gen-ts TS   generate ts file for i18n | support <EXP> like --output

Watcher options:
  -w WATCH [WATCH ...], --watch WATCH [WATCH ...]
                        watch files or directories
  -e EXCLUDE [EXCLUDE ...], --exclude EXCLUDE [EXCLUDE ...]
                        exclude files glob expression
  -c FILE, --config FILE
                        read specific config file

Configuration

pyuiw would read the pyproject.toml by default or you can set the --config flag to read specific config file.

here is the default options in config file.

[tool.pyuiw]
QtModule = "Qt"
exclude = [] # using glob pattern for exclude
useQt = true
watch = []
execute = true
debug = false
from_imports = false
preview = false
indent = 4
output = "<${ui_dir}/${ui_name}_ui.py>"
black = true
isort = true

here is a example setup.

[tool.pyuiw]
exclude = ["*launcher*"] # exclude file contain `launcher`
watch = ["./tests/ui","./test2/test.ui"] # read the file or directory get all the `.ui` file for watch

TodoList

  • import code to the top (implement isort)
  • black format code
  • poetry pypi python package
  • poetry command line tool
  • add pytest
  • auto create ts file
  • shield.io icon
  • add sphinx docs

uic enhance

  • implement Qt.py for QApplication.translate
  • customize import
  • modern signal connections
  • designer theme to standard icon set

Metadata

Release files for pyuiw 0.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyuiw 0.2.4
File Size Uploaded Provenance Actions
pyuiw-0.2.4.tar.gz 68.9 kB Without provenance Details for pyuiw-0.2.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyuiw 0.2.4
File Interpreter ABI Platform Actions
pyuiw-0.2.4-py3-none-any.whl Python 3 none any Details for pyuiw-0.2.4-py3-none-any.whl

Total release size: 122.7 kB

Release files / pyuiw-0.2.4.tar.gz

Download URL pyuiw-0.2.4.tar.gz
Size 68.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c752a4035eafa065081a0d1ea5976aaf463f8895305bb24080c6fab2dc49fd12
BLAKE2b-256 checksum
How to use checksums
0aab6050c3d46d219465fe8a029fa144081d57f46db935fd1cf598952c49958b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.12 CPython/3.8.12 Windows/10

Release files / pyuiw-0.2.4-py3-none-any.whl

Download URL pyuiw-0.2.4-py3-none-any.whl
Size 53.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5e744207fb2cba78ea67eb2227a99dca5b25fcebd68489537edc7d3cd61f37eb
BLAKE2b-256 checksum
How to use checksums
e49dab3230f90cbb1ad228f782b7ef413cdafabb1482357dbf9e1d3a8c022a85
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.12 CPython/3.8.12 Windows/10

Security for pyuiw 0.2.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page