سؤال

I'm developing a system, and I have build a code generator that emits a bunch of classes based on a configuration file.

I would like to configure PyDev to invoke the generator for me whenever the configuration file (or the generator source) changes. I know that this is possible "in theory" because e.g., the ANTLR plugin for Eclipse does this in Java.

Is there any kind of support in PyDev for doing this? If not, is there some other Eclipse hackery that I can use to get this working?

هل كانت مفيدة؟

المحلول

It should be possible to do what you want using an external builder inside Eclipse...

Right click project > properties > builders > new > program, then configure the program as python having as a parameter the module to run and receiving as arguments also the ${build_files} variable (if it's a python script, you have to put your Python.exe as the executable, your main file as an argument and then the ${build_files} variable).

نصائح أخرى

Only for those coming here through Google

You may want to check this out....

http://www.rose-hulman.edu/class/csse/resources/Eclipse/eclipse-python-configuration.htm

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top