[Go to Previous] [Go to Next]


Environment
getJythonShellMaxHistoryLength( ) - Returns the current number of commands that are saved.
Usage: print getJythonShellMaxHistoryLength()

setJythonShellMaxHistoryLength( ) - Sets the number of commands that will be saved.

Usage: setJythonShellMaxHistoryLength(number)
Remarks:
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.
Example:
setJythonShellMaxHistoryLength(25)

collectGarbage( ) - Performs a garbage collection to free up memory.

Usage: collectGarbage()

removeAllData( ) - Removes all data sources added during the current session, without removing any displays.

Usage: removeAllData()

removeAllLayers( ) - Removes all layers that have been displayed.

Usage: removeAllLayers()

expandpath( ) - Expands the path entered.

Usage: expandpath(path)
Remarks:
Understands environmental variables such as "~" and "..".
Example:
print expandpath('$HOMEPATH')

editFile( ) - Pastes the content of a text file into the text input field of the Jython Shell.

Usage: editFile(path)
path - Directory path to the file to be added to the Jython Shell.
Remarks:
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.
Example:
editFile('C:\\Users\\myuser\\myscript.py')

getLogLevel( ) - Sets the logging level to be used by McIDAS-V.

Usage: print getLogLevel()
Remarks:
Returns the current logging level being used by McIDAS-V. This is composed of two items, level and effectiveLevel.
level- 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.
effectiveLevel- The logging level for the specific module specified in the command
Example:
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.

Usage: setLogLevel(level,keywords)
level- Logging level to be used. This can be set to TRACE, DEBUG, INFO, WARN, ERROR, or OFF. Information about each of these logging levels can be found in the Advanced Preferences page.
Keywords:
temporary= determines if the logging level will be saved from session to session (default = True)
Remarks:
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.
Examples:
setLogLevel('TRACE')
Sets the logging level for everything to Trace as long as a logging level for another directory hasn't already been set.
print getLogLevel()
Returns the global logging level in McIDAS-V.  Both level and effectiveLevel are set to TRACE.

[Go to Previous] [Go to Next]