Il 13/12/2011 10.28, iaborsi ha scritto: > Hi Antonio, > thanks a lot! I've tried that: very easy, and it works perfectly! > I take this opportunity to make an additional question: if in writing > this Jython function I need additional Modules (typically an original > group of functions defined by myself) which is the right path to save > this stuff? I guess is the same directory from which I upload my Jython > function, isn't it? > To be clearer (following you example below): I want to modify your > example script "conversion.py" in this way: > ------- > from MyNewModule import * > > def m2tokm2(value): > temp=value/1000000 > result = MyNewFunction(temp) > return result > ------- > where MyNewFunction() is defined within the module MyNewModule. > > I guess I have to save the module within the same path of conversion.py. > Right?
Good idea, Iacopo! Importing further modules would extend the potentiality of advanced expressions. It should be possible to import a module within the same path, however it returns always a Jython exception. Probably the simplest way to use other functions contained in other module(s) consists in processing them before, even if it's not pythonic at all. Cheers, Antonio -- Antonio Falciano http://www.linkedin.com/in/antoniofalciano _______________________________________________ Gvsig_internacional mailing list Gvsig_internacional@listserv.gva.es To see the archives, edit your preferences or unsubscribe from this mailing list, please access this url: http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional