Builtin features

This section describes built-in features of the LMIShell.

Configuration file

The LMIShell has a tiny configuration file with location ~/.lmishellrc. In configuration file, you can set these properties:

# location of the history used by interactive mode
history_file = "~/.lmishell_history"
# length of history file, -1 for unlimited
history_length = -1
# default value for cache usage
use_cache = True
# default value for exceptions
use_exceptions = False

Inspecting a script

If you want to inspect a script after it has been interpreted by the LMIShell, run this:

$ lmishell -i some_script.lmi
# some stuff done
>

NOTE: Prefered extension of LMIShell’s scripts is .lmi.

LMI Is Instance

LMIShell is able to verify, if a LMIInstance or LMIInstanceName object passed to lmi_isinstance() is a instance of LMIClass.

The function is similar to python’s isinstance():

> lmi_isinstance(inst, cls)
True/False
>

LMI Associators

LMIShell can speed up associated objects’ traversal by manual joining, instead of calling LMIInstance.associators(). The call needs to get a list of association classes, for which the referenced objects will be joined. The list must contain objects of LMIClass.

See following example:

> associators = lmi_associators(list_of_association_classes)
>

Table Of Contents

Previous topic

Interactive Interface

Next topic

API Documentation

This Page