Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/pyroute2/ndb/__pycache__/report.cpython-39.pyc
Ðазад
a ]�ht/ � @ s� d Z ddlZddlZddlmZ ddlmZ dZdZddd �Z dd d�Z G dd � d �ZG dd� de�Z G dd� de�ZG dd� de �ZdS )a� .. note:: New in verision 0.5.11 .. testsetup:: from pyroute2 import NDB ndb = NDB(sources=[{'target': 'localhost', 'kind': 'IPMock'}]) .. testcleanup:: * for key, value in tuple(globals().items()): if key.startswith('ndb') and hasattr(value, 'close'): value.close() Filtering example: .. testcode:: report = ndb.interfaces.dump() report.select_fields('index', 'ifname', 'address', 'state') report.transform_fields( address=lambda r: '%s%s.%s%s.%s%s' % tuple(r.address.split(':')) ) for record in report.format('csv'): print(record) .. testoutput:: 'index','ifname','address','state' 1,'lo','0000.0000.0000','up' 2,'eth0','5254.0072.58b2','up' � N)�chain)�clii'