Skip to content

Instantly share code, notes, and snippets.

@LinuxPhreak
Created November 12, 2018 14:06
Show Gist options
  • Save LinuxPhreak/1b8a0b469c165cd2e2dc19366209d805 to your computer and use it in GitHub Desktop.
Save LinuxPhreak/1b8a0b469c165cd2e2dc19366209d805 to your computer and use it in GitHub Desktop.
PyUIC5 wrapper
#!/usr/bin/env python3
from subprocess import run
import os.path
print("\033[0;33;48m Welcome to UI converter.")
ui = input("\033[0;37;48m UI File:")
output = input("Output File:")
if (os.path.exists(ui)):
run(["pyuic5","-x", ui,"-o",output])
print("File has been created and is currently located at \n \033[1;32;48m", output)
else:
print("\033[1;31;48m No such UI File...")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment