Python Forum

Full Version: Converting .ui to .py with the command prompt? PyQt & pyuic4
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So I am trying to learn how to convert .ui to .py after creating a .ui app in PyQt Designer.
I am using the Command Prompt for the supposed sake of efficiency, however when I run my command I receive some errors and I have no idea what I am doing wrong.

I do have the pyuic4 command utility bundled within PyQt.
So I navigated to the *.ui file I want to convert and execute this command:

C:\Python32\Lib\site-packages\PyQt4\pyuic4 *.ui -o *.py

The returned error is that it is not a recognized internal or external operable batch file.

Is there something I am doing wrong?
You should download and read the white paper. It has examples. see:https://www.riverbankcomputing.com/software/pyqt/whitepaper
You don't need to do conversion, code runs directly from your python script
FYI: The Qt Company no longer supports Qt v4. PyQt5 and Qt v5 are strongly recommended for all new development.