Package command_system :: Package implementation :: Module middleware :: Class CommandTools
[hide private]
[frames] | no frames]

Class CommandTools

source code

Contains a set of basic tools and shortcuts you can use in your commands to perform some simple operations. These will be merged directly into the controls, by CommandTools being among superclasses of the controls.
Instance Methods [hide private]
 
__init__(self) source code
 
install_tags(self) source code
 
shift_line(self) source code
 
append_with_tags(self, text, *tags) source code
 
echo(self, text, tag='command_ok')
Print given text to the user, as a regular command output.
source code
 
echo_error(self, text)
Print given text to the user, as an error command output.
source code
 
send(self, text)
Send a message to the contact.
source code
 
set_input(self, text)
Set given text into the input.
source code
 
clear_input(self)
Clear input.
source code
 
add_history(self, text)
Add given text to the input history, so user can scroll through it using ctrl + up/down arrow keys.
source code
Properties [hide private]
  connection
Get the current connection object.
  full_jid
Get a full JID of the contact.
Method Details [hide private]

__init__(self)
(Constructor)

source code 

install_tags(self)

source code 

shift_line(self)

source code 

append_with_tags(self, text, *tags)

source code 

echo(self, text, tag='command_ok')

source code 
Print given text to the user, as a regular command output.

echo_error(self, text)

source code 
Print given text to the user, as an error command output.

send(self, text)

source code 
Send a message to the contact.

set_input(self, text)

source code 
Set given text into the input.

clear_input(self)

source code 
Clear input.

add_history(self, text)

source code 
Add given text to the input history, so user can scroll through it using ctrl + up/down arrow keys.

Property Details [hide private]

connection

Get the current connection object.
Get Method:
unreachable.connection(self) - Get the current connection object.

full_jid

Get a full JID of the contact.
Get Method:
unreachable.full_jid(self) - Get a full JID of the contact.