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 program DBM Server.
The result of the DBM command is returned.
If the DBM Server program returns an error, an exception of the class DBMServError is raised.
Specifying a valid DBM command
result = session.cmd
('db_state')
print repr (result)
Output:
'State\nOFFLINE\n'
Specifying an invalid DBM command
result = session.cmd
('invalid command')
print repr (result)
Output:
Traceback (innermost
last):
dbm.DBMServError:
[-24977] unknown command "invalid"
(See also: Method rawCMD)