[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20050831: IDV + calling functions in jython from custom java packages



>From: "Valentijn Venus" <address@hidden>
>Organization: ITC
>Keywords: 200508312110.j7VLAQjo012462 IDV extensions

Hi Valentijn-

>thanks for your help, and no worries it took a bit longer...
>
>We completed building the satellite/solar zenith angle functions, and are now 
> trying to load them in but placing the new jar in the same folder as the othe
> rs and calling it from jython as indicated below doesn't seem to do the job. 
>
>import sys;
>sys.add_package('angles')  

Since this JAR file is not in your classpath, then it doesn't get 
picked up.  

What is in this jar file?  Is it a single .py file (or even a handful)
or does it have code as well?

If it's just a .py file, you could:

put it in your ~/.metapps/DefaultIdv directory and call it default.py.
This will automatically read it in.

If it's several .py files, you could put them in the ~/.metapps/DefaultIdv 
directory and modify the idv.rbi file there to add in the list of 
files to the section:

  <!-- Python libraries   -->
  <resources name="application.resource.jython">
  </resources>

e.g.

  <!-- Python libraries   -->
  <resources name="application.resource.jython">
     <resource location="%USERPATH%/file1.py"/>
     <resource location="%USERPATH%/file2.py"/>
     <resource location="%USERPATH%/file3.py"/>
  </resources>

If there is code in there, then could you send me the JAR file and
I can figure out how to do what you want?

Thanks.

Don
NOTE: All email exchanges with Unidata User Support are recorded in the
Unidata inquiry tracking system and then made publicly available
through the web.  If you do not want to have your interactions made
available in this way, you must let us know in each email you send to us.