469,328 Members | 1,327 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,328 developers. It's quick & easy.

Compile ui files from within Eclipse

Hello,

I am new to the Eclipse IDE.

I am using pydev plug-in to create python projects.

Is there a way to create custom builders to build certain types of
files?

I have done this with other IDE's but can't seem to figure it out
with Eclipse.

I am trying to build *.ui files of a pydev project to create the
corresponding py files.

For example to do this the manual way I would:

pyuic.exe c:\source.ui > c:\dest.py
Thanks.

Mar 6 '06 #1
4 2538
Chuck wrote:
Hello,

I am new to the Eclipse IDE.

I am using pydev plug-in to create python projects.

Is there a way to create custom builders to build certain types of
files?

I have done this with other IDE's but can't seem to figure it out
with Eclipse.

I am trying to build *.ui files of a pydev project to create the
corresponding py files.

For example to do this the manual way I would:

pyuic.exe c:\source.ui > c:\dest.py
Thanks.

You can, just create an external tool. (menu: run > external tools >
external tools). You can also add a keybinding to the last external tool
launched.

Cheers,

Fabio

--
Fabio Zadrozny
------------------------------------------------------
Software Developer

ESSS - Engineering Simulation and Scientific Software
www.esss.com.br

Pydev Extensions
www.fabioz.com/pydev

PyDev - Python Development Enviroment for Eclipse
pydev.sf.net
pydev.blogspot.com
Mar 7 '06 #2
Well, I tried that but there isnt a way to get the filename without the
extension.

For example,
pyuic -o MyClass.py MyClass.ui

Using the variables in the external tool config I dont see a way to get
just the filename in order to create an output filename and pass it
into the pyoic.

Mar 7 '06 #3
I guess I could prompt for input but was hoping to find a better way.

Mar 7 '06 #4
Chuck wrote:
I guess I could prompt for input but was hoping to find a better way.

Well, what we usually do here is creating a simple python script (in our
case build_ui) which receives something that Eclipse can give you (we
use a folder, so that it builds all the .ui files below that folder --
recursively), and then we pass that script in the external tool
(actually as a parameter, as the tool will be python itself). It is not
only easier within Eclipse, but in the command line too.

Cheers,

Fabio

--
Fabio Zadrozny
------------------------------------------------------
Software Developer

ESSS - Engineering Simulation and Scientific Software
www.esss.com.br

Pydev Extensions
www.fabioz.com/pydev

PyDev - Python Development Enviroment for Eclipse
pydev.sf.net
pydev.blogspot.com
Mar 7 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Patrick Vanhoof | last post: by
22 posts views Thread by Qopit | last post: by
1 post views Thread by Robert Blackwell | last post: by
30 posts views Thread by David T. Ashley | last post: by
6 posts views Thread by Johs | last post: by
reply views Thread by shuimuliang | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by haryvincent176 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.