def printheaders(step,*,file, id, http_part, colourful):
"""Prints out the heading of the step to the output file"""
logging.debug("in printheaders() http_part=" + http_part)
od = collections.OrderedDict(sorted(eval("step."+ http_part +".headers.items()"))) # sort the headers
for key, val in od.items():
if colourful: #for now, does the same thing
#print(highlight(key +": "+ val, lexers.TextLexer(stripnl=True), formatters.TerminalFormatter()), file=file)
print(key +": "+val, file=file)
else:
print(key +": "+val, file=file)
#TODO: @REFACTOR (60) refactor all these print* functions -- too much copy/paste!
评论列表
文章目录