getJythonShellMaxHistoryLength( ) - Returns the current number of commands that are saved.
Usage: print getJythonShellMaxHistoryLength()
setJythonShellMaxHistoryLength( ) - Sets the number of commands that will be saved.
This is the number of commands that will be listed out with the File>List Saved History menu item in the Jython Shell, as well as the number that will be added to the Local Jython Library from the File>Save Commands to Jython Library menu item. The default number of commands saved to the history is 100.
collectGarbage( ) - Performs a garbage collection to free up memory.
removeAllData( ) - Removes all data sources added during the current session, without removing any displays.
removeAllLayers( ) - Removes all layers that have been displayed.
expandpath( ) - Expands the path entered.
Understands environmental variables such as "~" and "..".
editFile( ) - Pastes the content of a text file into the text input field of the Jython Shell.
path - Directory path to the file to be added to the Jython Shell.
Pastes the text of an existing file into the text input field of the Jython Shell. This makes it easy to evaluate and edit scripts.
getLogLevel( ) - Sets the logging level to be used by McIDAS-V.
Usage: print getLogLevel()
Returns the current logging level being used by McIDAS-V. This is composed of two items, level and effectiveLevel.
||The logging level of the directory path used in the command. If a directory path is not specified, this is the logging level for the session as a whole.
||The logging level for the specific module specified in the command
print getLogLevel( )
This returns the logging level for everything as long as a logging level for another directory hasn't already been set.
setLogLevel( ) - Sets the logging level to be used by McIDAS-V.
level- Logging level to be used. This can be set to TRACE
, or OFF
. Information about each of these logging levels can be found in the Advanced Preferences
||determines if the logging level will be saved from session to session (default = True)
This command can be used to set the logging level for the session as a whole, and it can also be used to set logging levels for specific directories to control what type of logging output goes to mcidasv.log.
Sets the logging level for everything to Trace as long as a logging level for another directory hasn't already been set.
Returns the global logging level in McIDAS-V. Both level and effectiveLevel are set to TRACE.
importEnhancement( ) - Imports a local enhancement file. This enhancement will then be available for use in a script as well as through the Color Table Editor in the current and future McIDAS-V sessions.
Keywords - required:
||full path and file name of the local enhancement file
Keywords - optional:
||name of the enhancement; default = the base filename without the extension (e.g. 'cape.xml' will become 'cape')
||the category that the enhancement will be saved under. This name is used in the Color Table Editor under the Color Tables menu and allows for organization of enhancements; default= 'Basic'.
||sets if the command will overwrite any previously-existing enhancements with the same name. When set to False, an additional enhancement will be added to the list of color tables, and the name will be appended with '_#'. For example, if an enhancement named 'cape' already exists and an importEnhancement() command is run with the name specified as 'cape' and overwrite set to False, then the new enhancement will be saved with a name of 'cape_1'. If set to True, then the existing enhancement will be overwritten with the new one; default= False
The list of supported enhancement formats with importEnhancement() is the same as what can be imported through the Color Table Editor:
- IDV color table (*.xml)
- GEMPAK color table (*.tbl)
- 3-column RGB color table (*.ascii)
- McIDAS-X color table (*.et)
- AWIPS II color table (*.cmap)
If the enhancement specified in the filename keyword of importEnhancement() was originally exported from McIDAS-V, then the name and category keywords will be set from the values that already exist in the enhancement file.
importEnhancement(filename='C:\\Users\\myuser\\cape.xml', name='CAPE', category='Severe')
see( ) - Inspects an object passed through the function and prints out a list of different functions that can be used on the object.
||data or layer object passed through the function. The returned functions can be applied on the obj object.
||filters the list of commands returned from the function. Wildcards (*) can be used.
If the obj keyword is omitted, the command will list all of the functions and packages that can be used in the current session.
Returns a list of functions beginning with ".get" that can be applied on the data object.