fatalsaint is right, never ever touch generated code. An old indian trick is to automate pyuic4 calls - before you do the import, check timestamps and do a pyuic call if the .ui is newer (I intentionally won't show you how to do this so you could discover it on your own ). On the long run this saves you a little bit of typing, and a lot of time when something doesn't work because you forgot pyuic (and that can happen a lot if you have a 100 .ui-s )