Edit File: module.cpython-36.opt-1.pyc
3 ��<_Q(������������������@���s��d�dl�mZ�d�dlZd�dlZd�dlmZ�ejd��dkZy djZW�n �e k r`���d�dl mZ�Y�nX�d�dlZddlm Z mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ�dd lm Z m!Z!�dd l"m#Z#m$Z$m%Z%m&Z&m'Z'�e j(��Z)i�Z*dd��Z+d d��Z,G�dd��de-�Z.dd��Z/dS�)�����)�absolute_importN)�Lock������)� maketrans����)� Repository�FunctionInfo�RegisteredTypeInfo�EnumInfo� ObjectInfo� InterfaceInfo�ConstantInfo� StructInfo� UnionInfo�CallbackInfo�Struct�Boxed� CCallback�enum_add�enum_register_new_gtype_and_add� flags_add� flags_register_new_gtype_and_add� GInterface)�GObjectMeta� StructMeta)� TYPE_NONE� TYPE_BOXED�TYPE_POINTER� TYPE_ENUM� TYPE_FLAGSc�������������C���sP���|�j���}|s(|�j��}|r$|jr$|jS�tS�|j��}|j��}tjd|��}t||�S�)Nzgi.repository.) Z get_parent� get_g_type�pytype�object� get_namespace�get_name� importlib� import_module�getattr)�object_infoZparent_object_infoZgtype� namespace�name�module��r-����/usr/lib64/python3.6/module.py�get_parent_for_objectL���s���� r/���c�������������C���sH���g�}x>|�j���D�]2}|j��}|j��}tjd|��}|jt||���qW�|S�)Nzgi.repository.)Zget_interfacesr$���r%���r&���r'����appendr(���)r)���� interfacesZinterface_infor*���r+���r,���r-���r-���r.����get_interfaces_for_objectc���s����r2���c���������������@���s2���e�Zd�ZdZddd�Zdd��Zdd��Zd d ��ZdS�)�IntrospectionModuleaU��An object which wraps an introspection typelib. This wrapping creates a python module like representation of the typelib using gi repository as a foundation. Accessing attributes of the module will dynamically pull them in and create wrappers for the members. These members are then cached on this introspection module. Nc�������������C���sl���t�j||��||�_||�_d|�|�_t�j|�j�}|g|�_trH|jd�g|�_|�jdkr`t�j |�j�|�_t ��|�_dS�)z"Might raise gi._gi.RepositoryErrorzgi.repository.zUTF-8N)� repositoryZrequire� _namespaceZ_version�__name__�get_typelib_path�__path__� _have_py3�decodeZget_versionr����_lock)�selfr*����version�pathr-���r-���r.����__init__v���s���� zIntrospectionModule.__init__c���������� ������s���t�j|�j|�}|s$td|�j|f���t|t��r"|j��}|�j���|j }|d�k�r|j ��rv|jt�rlt |�}q�t|�}n|jt�r�t|�}nt|�}||_d|j���|_tdd�}x2|j��D�]&}|j��j|�}t||||j�����q�W�x|j��D�]}t||j|��q�W�|tk�r||_ W�d�Q�R�X��n�t|t��r�|j��}t|t��rtt|���t ��fdd�t!|�D���} ��f| �} t"}n�t|t#��r�t$f} t"}n�t|t%��r�t&f} t"}ntt|t't(f��r|jt)��r�t*f} nB|jt+��s�|tk�s�|j,|k�r�t-f} nt.d|j��|j/��f���t0}nt1|��|�j�f�|tk�rR|j }|d�k �rR|| k�rR||�j2|<�|S�|d|�j�|d�} ||| | �}|tk�r�||_ W�d�Q�R�X�n0t|t3��r�|}nt|t4��r�|j��}nt1|��||�j2|<�|S�) Nz%r object has no attribute %rzgi.repository.ZabcdefgjhijklmnopqrstuvwxyzZABCDEFGJHIJKLMNOPQRSTUVWXYZc�������������3���s���|�]}t���|�s|V��qd�S�)N)� issubclass)�.0Z interface)�parentr-���r.���� <genexpr>����s����z2IntrospectionModule.__getattr__.<locals>.<genexpr>z$unable to create a wrapper for %s.%s)�__info__� __module__Z __gtype__)5r4���Zfind_by_namer5����AttributeErrorr6���� isinstancer���r!���r;���r"���Zis_flagsZis_ar ���r���r���r���r���r���rD���r$���rE���r���Z get_valuesZget_name_unescaped� translate�setattrZ get_valueZget_methodsr���r ���r���r/����tupler2���r���r���r���r ���r���r���r���r���r���r���Zfundamentalr���� TypeErrorr%���r����NotImplementedError�__dict__r ���r���)r<���r+����infoZg_type�wrapperZascii_upper_transZ value_infoZ value_nameZmethod_infor1����bases� metaclassZtype_Zdict_r-���)rB���r.����__getattr__����s����� zIntrospectionModule.__getattr__c�������������C���s(���t�j|�j�}tr|jd�}d|�j|f�S�)NzUTF-8z <IntrospectionModule %r from %r>)r4���r7���r5���r9���r:���)r<���r>���r-���r-���r.����__repr__����s���� zIntrospectionModule.__repr__c�������������C���sF���t�t|�j��}|j|�jj����tj|�j�}|jdd��|D����t |�S�)Nc�������������s���s ���|�]}t�|t�s|j��V��qd�S�)N)rG���r���r%���)rA���rN���r-���r-���r.���rC�����s����z.IntrospectionModule.__dir__.<locals>.<genexpr>) �set�dir� __class__�updaterM����keysr4���Z get_infosr5����list)r<����resultZnamespace_infosr-���r-���r.����__dir__����s ����zIntrospectionModule.__dir__)N)r6���rE����__qualname__�__doc__r?���rR���rS���r[���r-���r-���r-���r.���r3���n���s ��� lr3���c�������������C���s0���|�t�krt�|��S�tj|��}t|�|�}|t�|�<�|S�)z� :Returns: An object directly wrapping the gi module without overrides. Might raise gi._gi.RepositoryError )�_introspection_modules�giZget_required_versionr3���)r*���r=���r,���r-���r-���r.����get_introspection_module��s���� r`���)0Z __future__r����sysr&���Z threadingr����version_infor9���r���rF����stringr_���Z_gir���r ���r ���r���r���r ���r���r���r���r���r���r���r���r���r���r���r���r����typesr���r���Z _constantsr���r���r���r���r ���Zget_defaultr4���r^���r/���r2���r#���r3���r`���r-���r-���r-���r.����<module>���s&��� P�