本文整理汇总了Python中util.pretty_port函数的典型用法代码示例。如果您正苦于以下问题:Python pretty_port函数的具体用法?Python pretty_port怎么用?Python pretty_port使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了pretty_port函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: pretty_print
def pretty_print(self, q):
q.text("queue_stats_entry {")
with q.group():
with q.indent(2):
q.breakable()
q.text("port_no = ")
q.text(util.pretty_port(self.port_no))
q.text(",")
q.breakable()
q.text("queue_id = ")
q.text("%#x" % self.queue_id)
q.text(",")
q.breakable()
q.text("tx_bytes = ")
q.text("%#x" % self.tx_bytes)
q.text(",")
q.breakable()
q.text("tx_packets = ")
q.text("%#x" % self.tx_packets)
q.text(",")
q.breakable()
q.text("tx_errors = ")
q.text("%#x" % self.tx_errors)
q.breakable()
q.text("}")
示例2: pretty_print
def pretty_print(self, q):
q.text("port_desc {")
with q.group():
with q.indent(2):
q.breakable()
q.text("port_no = ");
q.text(util.pretty_port(self.port_no))
q.text(","); q.breakable()
q.text("hw_addr = ");
q.text(util.pretty_mac(self.hw_addr))
q.text(","); q.breakable()
q.text("name = ");
q.pp(self.name)
q.text(","); q.breakable()
q.text("config = ");
q.text("%#x" % self.config)
q.text(","); q.breakable()
q.text("state = ");
q.text("%#x" % self.state)
q.text(","); q.breakable()
q.text("curr = ");
q.text("%#x" % self.curr)
q.text(","); q.breakable()
q.text("advertised = ");
q.text("%#x" % self.advertised)
q.text(","); q.breakable()
q.text("supported = ");
q.text("%#x" % self.supported)
q.text(","); q.breakable()
q.text("peer = ");
q.text("%#x" % self.peer)
q.breakable()
q.text('}')
示例3: pretty_print
def pretty_print(self, q):
q.text("port {")
with q.group():
with q.indent(2):
q.breakable()
q.text("value = ");
q.text(util.pretty_port(self.value))
q.breakable()
q.text('}')
示例4: pretty_print
def pretty_print(self, q):
q.text("output {")
with q.group():
with q.indent(2):
q.breakable()
q.text("port = ");
q.text(util.pretty_port(self.port))
q.text(","); q.breakable()
q.text("max_len = ");
q.text("%#x" % self.max_len)
q.breakable()
q.text('}')
示例5: pretty_print
def pretty_print(self, q):
q.text("enqueue {")
with q.group():
with q.indent(2):
q.breakable()
q.text("port = ");
q.text(util.pretty_port(self.port))
q.text(","); q.breakable()
q.text("queue_id = ");
q.text("%#x" % self.queue_id)
q.breakable()
q.text('}')