Bases: object
Bases: deluge.component.Component
Processes a command.
| Parameter: | cmd – str, the command string |
|---|
Gets a torrent name from the torrents list.
| Parameter: | torrent_id – str, the torrent_id |
|---|---|
| Returns: | the name of the torrent or None |
Returns a list of torrent_id matches for the string. It will search both torrent_ids and torrent names, but will only return torrent_ids.
| Parameter: | string – str, the string to match on |
|---|---|
| Returns: | list of matching torrent_ids. Will return an empty list if no matches are found. |
This method is called by the curses.wrapper to start the mainloop and screen.
| Parameter: | stdscr – curses screen passed in from curses.wrapper |
|---|
Completes torrent_ids or names.
| Parameter: | line – str, the string to complete |
|---|---|
| Returns: | list of matches |
Called when the user hits ‘tab’ and will autocomplete or show options. If a command is already supplied in the line, this function will call the complete method of the command.
| Parameters: |
|
|---|---|
| Returns: | 2-tuple (string, cursor position) |
Writes a line out depending on if we’re in interactive mode or not.
| Parameter: | line – str, the line to print |
|---|
Bases: optparse.OptionParser
subclass from optparse.OptionParser so exit() won’t exit.
error(msg : string)
Print a usage message incorporating ‘msg’ to stderr and exit. If you override this in a subclass, it should not return – it should either exit or raise an exception.