当前位置: 首页>>代码示例>>Python>>正文


Python util.pretty_port函数代码示例

本文整理汇总了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("}")
开发者ID:dtalayco,项目名称:oftest,代码行数:25,代码来源:common.py

示例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('}')
开发者ID:jerk1991,项目名称:loxigen-artifacts,代码行数:33,代码来源:common.py

示例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('}')
开发者ID:TestNAutomation,项目名称:oftest,代码行数:9,代码来源:bsn_tlv.py

示例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('}')
开发者ID:StonyBrookUniversity,项目名称:oftest,代码行数:12,代码来源:action.py

示例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('}')
开发者ID:Srinivas-E,项目名称:oftest,代码行数:12,代码来源:action.py


注:本文中的util.pretty_port函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。