Menu

#773 additions for next Jython upgrade

open
nobody
None
5
2022-06-21
2022-02-21
No

Autoplot imports a number of symbols when it starts a Jython script, like the getParam function. This ticket is to keep track of what's needed for Autoplot Jython version 2.10

See JythonSupport/src/autoplot2017.py

Discussion

  • Jeremy Faden

    Jeremy Faden - 2022-02-21

    NaN should always be imported to encourage its use:

    from java.lang.Double import NaN
    
     
  • Jeremy Faden

    Jeremy Faden - 2022-02-21

    Somewhere I have a getParam which will not allow a parameter to be outside the bounds constrained using min and max.

    i= getParam( 'volume', 11, 'volume', { "min":0, "max":10 } )
    

    would throw an error rather than run the code with the value. This is important because it makes it easier to prove that a code is safe to run and allows for the creation of more useful GUIs.

     

    Last edit: Jeremy Faden 2 days ago