Entering content frame

Background documentation cmd Method Locate the document in the library structure

Definition

cmd (cmd_string)

Use

cmd is a method of the class DBM. You use this method to send the DBM command specified under cmd_string to the Database Manager program.

Result

The result of the DBM command is returned.

If the Database Manager returns an error, an exception of the class DBMServError is raised.

Examples

Inputting a valid DBM command:

result = session.cmd ('db_state')
print repr (result)

Result:

'State\nOFFLINE\n'

 

Inputting an invalid DBM command:

result = session.cmd ('invalid command')
print repr (result)

Result:

Traceback (innermost last):
dbm.DBMServError: [-24977] unknown command "invalid"

(See also: Method rawCmd)

 

Leaving content frame