I use PyDev in Eclipse with the Qt integration. With an external tool I can create python source in a .py from a qt .ui file. This is the external tool: http://permalink.gma
There is an easy solution to this problem that requires no scripting at all.
Install pathtools plugin either through Eclipse updates or via the Eclipse marketplace:
Setup an External Tools Configurations option in Eclipse as follows
In Main:
Note that ${parent-path} and ${name-sans-extension} are arguments made available through the pathtools plugin.
If you apply this and then run the configuration on a .ui resource file, you'll see a new .py file created.