本文整理汇总了Python中CTCore.show_errors方法的典型用法代码示例。如果您正苦于以下问题:Python CTCore.show_errors方法的具体用法?Python CTCore.show_errors怎么用?Python CTCore.show_errors使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CTCore
的用法示例。
在下文中一共展示了CTCore.show_errors方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: do_req
# 需要导入模块: import CTCore [as 别名]
# 或者: from CTCore import show_errors [as 别名]
def do_req(self, line):
try:
l = line.split(" ")
if (l[0] == ""):
self.help_req()
else:
id, size = get_id_size(line)
request, size = CTCore.get_request_size(id, "all")
name = CTCore.get_name(id)
print "Displaying request for object {} ({}) [{} bytes]:".format(id, name, size)
CTCore.show_errors()
print newLine + request
except Exception,e:
print str(e)
示例2: do_body
# 需要导入模块: import CTCore [as 别名]
# 或者: from CTCore import show_errors [as 别名]
def do_body(self, line):
try:
l = line.split(" ")
if (l[0] == ""):
self.help_body()
else:
id, size = get_id_size(line)
response, size = CTCore.get_response_and_size(id, size)
name = CTCore.get_name(id)
print "Displaying body of object {} ({}) [{} bytes]:".format(id, name, size)
CTCore.show_errors()
print newLine + response
except Exception,e:
print str(e)
示例3: do_unzlib
# 需要导入模块: import CTCore [as 别名]
# 或者: from CTCore import show_errors [as 别名]
def do_unzlib(self,line):
try:
l = line.split(" ")
if (l[0] == ""):
self.help_unzlib()
else:
if l[0].lower() == "all":
CTCore.unzlib_all()
else:
id = int(l[0])
if in_range(id):
obj_num, name = CTCore.unzlib(id)
if obj_num != -1:
print " ZLIB Decompression of object {} ({}) successful!".format(str(id), name)
print " New object created: {}".format(obj_num) + newLine
else:
CTCore.show_errors()
except Exception,e:
print str(e)
示例4: do_ungzip
# 需要导入模块: import CTCore [as 别名]
# 或者: from CTCore import show_errors [as 别名]
def do_ungzip(self,line):
try:
line = str(line)
l = line.split(" ")
if (l[0] == ""):
self.help_ungzip()
else:
if l[0].lower() == "all":
CTCore.ungzip_all()
else:
id = int(l[0])
if in_range(id):
obj_num, name = CTCore.ungzip_and_add(id)
if obj_num != -1:
CTCore.conversations[int(id)].decoded = int(obj_num)
self.retval = " GZIP Decompression of object {} ({}) successful!".format(str(id), name)
self.retval += " New object created: {}".format(obj_num) + newLine
else:
CTCore.show_errors()
except Exception,e:
self.retval = str(e)