SOLVED!
<br/>It is enough to save the new Module(s) within the following gvSIG path:
<br/><br/>/bin/gvSIG/extensiones/org.gvsig.scripting/scripts/jython/Lib
<br/><br/>Of course, the Module has to be Jython compliant.
<br/><br/>Regards,
<br/>Iacopo
<br/><br/><br/>Iacopo Borsi
<br/>Dipartimento di Matematica U.Dini
<br/>Università di Firenze.
<br/>V.le Morgagni 67/A
<br/>50134 Firenze - Italy
<br/>Tel. +39.0554237147
<br/>Fax. +39.0554237133
<br/>e-mail <a href="/user/SendEmail.jtp?type=node&node=7093061&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>
<br/>Web: <a href="http://web.math.unifi.it/users/borsi" target="_top" rel="nofollow" link="external">http://web.math.unifi.it/users/borsi</a><br/><a href="http://sidgrid.isti.cnr.it" target="_top" rel="nofollow" link="external">http://sidgrid.isti.cnr.it</a><br/><br/>Quoting "Antonio Falciano [via OSGeo.org]"
<br/><<a href="/user/SendEmail.jtp?type=node&node=7093061&i=1" target="_top" rel="nofollow" link="external">[hidden email]</a>>:
<br/><div class='shrinkable-quote'><br/>>
<br/>>
<br/>> Il 13/12/2011 10.28, iaborsi ha scritto:
<br/>>> Hi Antonio,
<br/>>> thanks a lot! I've tried that: very easy, and it works perfectly!
<br/>>> I take this opportunity to make an additional question: if in writing
<br/>>> this Jython function I need additional Modules (typically an original
<br/>>> group of functions defined by myself) which is the right path to save
<br/>>> this stuff? I guess is the same directory from which I upload my Jython
<br/>>> function, isn't it?
<br/>>> To be clearer (following you example below): I want to modify your
<br/>>> example script "conversion.py" in this way:
<br/>>> -------
<br/>>> from MyNewModule import *
<br/>>>
<br/>>> def m2tokm2(value):
<br/>>> temp=value/1000000
<br/>>> result = MyNewFunction(temp)
<br/>>> return result
<br/>>> -------
<br/>>> where MyNewFunction() is defined within the module MyNewModule.
<br/>>>
<br/>>> I guess I have to save the module within the same path of conversion.py.
<br/>>> Right?
<br/>>
<br/>> Good idea, Iacopo! Importing further modules would extend the
<br/>> potentiality of advanced expressions. It should be possible to import a
<br/>> module within the same path, however it returns always a Jython
<br/>> exception. Probably the simplest way to use other functions contained in
<br/>> other module(s) consists in processing them before, even if it's not
<br/>> pythonic at all.
<br/>>
<br/>> Cheers,
<br/>> Antonio
<br/>>
<br/>> --
<br/>> Antonio Falciano
<br/>> <a href="http://www.linkedin.com/in/antoniofalciano" target="_top" rel="nofollow" link="external">http://www.linkedin.com/in/antoniofalciano</a><br/>> _______________________________________________
<br/>> Gvsig_internacional mailing list
<br/>> <a href="/user/SendEmail.jtp?type=node&node=7093061&i=2" target="_top" rel="nofollow" link="external">[hidden email]</a>
<br/>>
<br/>> To see the archives, edit your preferences or unsubscribe from this
<br/>> mailing list, please access this url:
<br/>>
<br/>> <a href="http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional" target="_top" rel="nofollow" link="external">http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional</a><br/>>
<br/>>
<br/>> _______________________________________________
<br/>> If you reply to this email, your message will be added to the
<br/>> discussion below:
<br/>> <a href="http://osgeo-org.1803224.n2.nabble.com/Field-Calculator-look-for-an-expression-saved-in-a-file-tp7086102p7092993.html" target="_top" rel="nofollow" link="external">http://osgeo-org.1803224.n2.nabble.com/Field-Calculator-look-for-an-expression-saved-in-a-file-tp7086102p7092993.html</a><br/>> To start a new topic under gvSIG users, email
<br/>> <a href="/user/SendEmail.jtp?type=node&node=7093061&i=3" target="_top" rel="nofollow" link="external">[hidden email]</a>
<br/>> To unsubscribe from gvSIG users, visit
<br/>> <a href="" target="_top" rel="nofollow" link="external">
<br/><br/><br/>----------------------------------------------------------------
<br/>This message was sent using IMP, the Internet Messaging Program.
<br/><br/><br/>
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://osgeo-org.1803224.n2.nabble.com/Field-Calculator-look-for-an-expression-saved-in-a-file-tp7086102p7093061.html">Re: Field Calculator: look for an expression saved in a file</a><br/>
Sent from the <a href="http://osgeo-org.1803224.n2.nabble.com/gvSIG-users-f2009903.html">gvSIG users mailing list archive</a> at Nabble.com.<br/>