def codeInput(self, text):
methodName = 'do'
if text[0] == '/':
split = string.split(text[1:],' ',1)
statement = split[0]
if len(split) == 2:
remainder = split[1]
if statement in ('browse', 'explore'):
methodName = 'explore'
text = remainder
elif statement == 'watch':
methodName = 'watch'
text = remainder
elif statement == 'self_rebuild':
rebuild.rebuild(explorer)
if _GNOME_POWER:
rebuild.rebuild(spelunk_gnome)
rebuild.rebuild(sys.modules[__name__])
return
try:
self.perspective.callRemote(methodName, text)
except pb.ProtocolError:
# ASSUMPTION: pb.ProtocolError means we lost our connection.
(eType, eVal, tb) = sys.exc_info()
del tb
s = string.join(traceback.format_exception_only(eType, eVal),
'')
self.connectionLost(s)
except:
traceback.print_exc()
gtk.mainquit()
评论列表
文章目录