Advertisement
Guest User

pyuic script

a guest
Aug 15th, 2012
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.25 KB | None | 0 0
  1. import os, os.path
  2. import sys
  3. import subprocess
  4.  
  5. file = sys.argv[1]
  6. if file.endswith('.ui'):
  7.     print subprocess.call(['pyside-uic', '-o', '%s_ui.py' %
  8.                            os.path.splitext(file)[0], file])
  9. else:
  10.     print 'Not an ui-file!'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement