avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject [Framework] Script updater ;)
Date Sun, 22 Apr 2001 11:48:59 GMT
Hi,

I just wrote an initial python script to translate the package imports
around. It should work if you use fuilly qualified imports. Theres only one
case that I know that it breaks (StringUtil was split into two classes and
thus can cause issues). 

I wrote it against CPyhton but in theory if the modules are available it
should run in jpyhton/jython. I don't think there is any platform
specific-ness about it. 

Example of how to use it

> cd jakarta-avalon
> tools/bin/fix-packages.py -s tools/translate-list.txt a/path/to/my/src

(prefix command with python on win32 platforms)

To add additional translations in add them to tools/translate-list.txt,
format can be seen by running fix-packages.py with no parameters or just
looking at translation file.

Long time since I programmed in python so it is probably extremely lame -
but it works (feel free to hack it to be better).

Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*


---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org


Mime
View raw message