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 Database Manager program.
Errors returned by the Database Manager 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.
Inputting a valid DBM command:
result = session.rawCmd
('db_state')
print repr (result)
Result:
'OK\nState\nOFFLINE\n'
Inputting an invalid DBM command:
result = session.rawCmd
('invalid command')
print repr (result)
Result:
'ERR\n-24977,ERR_COMMAND: unknown command "invalid"\n'