1

I am unable to use the command prompt due to security restrictions on my work PC and I am trying unsuccessfully to find a way to convert .ui files to .py without the pyuic4 batch file.

I have found the uic/pyuic.py program but have been unsuccessful in my attempts to run it from a python console.

Any help with this would be great.

Cheers.

jffp
  • 31
  • 3

1 Answers1

2

Thanks ekhumoro,

Was able to implement the uic successfully, using compileUiDir, since I have multiple .ui files. Final code was:

from PyQt4 import uic
folderToConvert = r'filePathGoesHere'
uic.compileUiDir(folderToConvert,recurse=False)

This is a .py file that I run or call/execute prior to running the main program. Very handy!

jffp
  • 31
  • 3