From: Ype K. <yk...@xs...> - 2002-02-11 19:01:57
|
leon, >On Wed, Feb 06, 2002 at 03:08:55PM +0200, leon j. breedt wrote: >> i need to make all the classes in a specific package available >> to Jython script code without the code having to qualify the >> class names. >it seems doing an exec() against the namespace works just as well.. >simplest solution best i guess :) I missed the first message, so I hope this is stil relevant: You can use the standard function __import() before actually executing your code. for all modnames: interpr.exec(modName + " = __import('" + pkgSubkpg + '.' + modName + "')") and then: interpr.exec(yourCode) Have fun, Ype -- |