← Back
Editing: bindgen.cpython-311.pyc
� +�c� � �� � d Z ddlZddlmZ ddlmc mZ ddlm Z ddl mZmZ ddl mZ G d� d� � Zd Z G d � d� � ZdZh d �Zd� Zdd�Zd� Zedk r e� � dS dS )z5Generate a wrapper class from DBus introspection data� N)�indent)�Introspectable)�open_dbus_connection�Proxy)�__version__c � � e Zd Zd� Zd� Zd� ZdS )�Methodc � � |j d | _ g | _ g | _ |� d� � D ]�} |j d }n7# t $ r* d� t | j � � � � }Y nw xY w| j � |� � | j � |j d � � ��d S )N�namezarg[@direction='in']zarg{}�type) �attribr �in_args� signature�findall�KeyError�format�len�append)�self�xml_node�argr s �1/usr/lib/python3/dist-packages/jeepney/bindgen.py�__init__zMethod.__init__ s� � ��O�F�+�� ��������#�#�$:�;�;� 6� 6�C� 9��z�&�)����� 9� 9� 9��~�~�c�$�,�&7�&7�8�8���� 9�����L����%�%�%��N�!�!�#�*�V�"4�5�5�5�5� 6� 6s � A�1A;�:A;c �8 � d� | j �� � S )Nz=def {name}(self): return new_method_call(self, '{name}') )r )r r )r s r �_make_code_noargszMethod._make_code_noargs s) � �?�@F���� AG� A� A� � c �: � | j s| � � � S d� | j � � }d� | j � � }t | j � � dk rdnd� |� � }d� | j |||�� � S )Nz, � � z({},)z({})zxdef {name}(self, {args}): return new_method_call(self, '{name}', '{signature}', {tuple}) )r �argsr �tuple)r r �joinr r r r )r r r r! s r � make_codezMethod.make_code s� � ��|� ,��)�)�+�+�+��y�y���&�&���G�G�D�N�+�+� ����-�-��2�2����F�F�t�L�L��8�9?������%� :@� : � : � r N)�__name__� __module__�__qualname__r r r# � r r r r sA � � � � � � 6� 6� 6�� � � � � � � r r z� class {cls_name}(MessageGenerator): interface = {interface!r} def __init__(self, object_path={path!r}, bus_name={bus_name!r}): super().__init__(object_path=object_path, bus_name=bus_name) c � � e Zd Zd� Zd� ZdS )� Interfacec � � |j d | _ || _ || _ d� |� d� � D � � | _ d S )Nr c �, � g | ]}t |� � ��S r'