cmd (cmd_string)
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.
The result of the DBM command is returned.
If the Database Manager returns an error, an exception of the class DBMServError is raised.
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)