We recommend switching to the latest versions of Edge, Firefox, Chrome or Safari. Using Internet Explorer will result in a loss of website functionality.

Build in functions and libraries

Comments

2 comments

  • Avatar
    Adrian Williams

    The Analyze nodes that utilize the Python language for scripting leverage Jython which is a Java implementation of the Python 2 language specification.

    The Jython implementation shipped with Analyze provides functionality broadly equivalent to that available in the Python Standard Library. You can view the details of the built-in functions included in the Jython Standard Library here. You can see the wider set of functionality supported by Jython here

    When editing the code in a node's property that supports scripting, you can access the list of functions that support tab completion by entering Ctrl+<Space> :

     

    If you know the function you want starts with a particular letter(s) you can enter the initial letter(s) and then use Ctrl+<Space> to display the subset of functions that match the characters you entered.

    There are a number of functions that have been implemented by Infogix that are not in the standard library such as those for handling input/ output metadata e.g. fields(). There are also a few items that are not currently in the tab completion list e.g. unicode() and long() and so do not implement syntax highlighting. 

    The 'Python scripting' topic in the Help documentation provides an overview of use of Python within Analyze. The 'Python scripting' > 'API and script bindings' topic provides details of the supported built-in variables and object types. The 'Python scripting' > 'Python module support' topic details the modules that are automatically imported, namely the 'datetime' module and the 'fn' module. 

    When searching online for information on the Python standard library you may also have seen the equivalent documentation for the Python standard library here. There is a great amount of overlap between this information and that on the Jython Standard Library page and for most circumstances the pages are interchangeable however, the Jython page should be considered the reference source when developing your code (though the Python page has a more pleasant layout).

    Note, we have roadmap items to improve our capabilities to support scripting in future releases.  

    Regards,

    Adrian

    0
    Comment actions Permalink
  • Avatar
    Adrian Williams

    You may also be interested in viewing the Python cheat sheet article:

    https://support.infogix.com/hc/en-us/articles/360037751033-Python-Cheat-Sheet

    0
    Comment actions Permalink

Please sign in to leave a comment.