# setting the level for the handler above seems to be a no-op
# it needs to be set for the logger, here the root logger
# otherwise it is NOTSET(=0) which means to log nothing.
logging.getLogger('').setLevel(logging.DEBUG)
else:
print"Attention: This script will print nothing if you use -q. So it might be boring to use it like that ;-)"
# example from a pure agent perspective
print'we are going to try and group chat with the agent\'s active group. set one active, or get the uuid and create a new script that does it for you!'
print''
print'This only works on unix like machines ATM.'
#grab a password!
password=getpass.getpass()
# let's disable inventory handling for this example
# until the implementation is done, add the agent to the group object
chat_group.agent=client
print''
print'I know, this interface is not an interface, you\'ll see, just type when prompted. Saijanai, sounds like you are up for a wx application. Hit Escape to trigger the message prompt.'
ifchat_group!=None:
chaty_kathy=MockChatInterface(client,chat_group.chat)# this object is l-a-m-e
chaty_kathy.start()
else:
print"We failed to find the group to start chat session :(. Continuing"
whileclient.running:
api.sleep(0)
print''
print''
print'At this point, we have an Agent object, Inventory dirs, and with a Region attribute'