rawCmd (cmd_string)
rawCmd 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.
Errors returned by the DBM Server do not raise an exception. The return code starts with OK if the command was executed successfully; it starts with ERR if the command failed.
(See also: Method cmd)
The result of the DBM command is returned.
Specifying a valid DBM command
result = session.rawCmd
('db_state')
print repr (result)
Output:
'OK\nState\nOFFLINE\n'
Specifying an invalid DBM command
result = session.rawCmd
('invalid command')
print repr (result)
Output:
'ERR\n-24977,ERR_COMMAND: unknown command "invalid"\n'