Python Forum
Converting .ui to .py with the command prompt? PyQt & pyuic4
Thread Rating:
  • 2 Vote(s) - 2.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Converting .ui to .py with the command prompt? PyQt & pyuic4
#1
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?
Reply
#2
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  What is the difference between Command Prompt and Sublimes yaoyao22 1 588 Jul-09-2023, 02:56 PM
Last Post: snippsat
  Facing Problem while opening a file through command prompt vlearner 4 1,856 Jan-30-2022, 08:10 AM
Last Post: snippsat
  Noob warning: trying to use pip to install pytest and pep8 in Command Prompt adifrank 4 5,230 Dec-20-2020, 04:23 AM
Last Post: adifrank
  Running Python in Command Prompt Anwar 3 3,000 Nov-15-2020, 03:15 PM
Last Post: snippsat
  starting python from windows command prompt MaartenRo 4 2,744 Sep-04-2020, 12:25 PM
Last Post: MaartenRo
  Will not print in command prompt PandaCode 12 12,824 May-06-2020, 03:48 AM
Last Post: PandaCode
  Script works when executed from command prompt but not when executed in SDP Tippex 0 1,965 Apr-07-2020, 04:26 PM
Last Post: Tippex
  Can read files in command prompt but not IDE Exsul 2 2,119 Sep-13-2019, 01:40 AM
Last Post: jsira2003
  command prompt saisankalpj 8 5,159 Nov-28-2018, 04:13 AM
Last Post: saisankalpj
  Command Prompt Issue benzenegirl 2 2,521 Oct-25-2018, 03:09 PM
Last Post: The_Raven

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020