o
    i                     @   sF   d dl Zd dlZdd Zdd ZdddZdd	 Zd
d Zdd Z	dS )    Nc                 C   s\   zddl m} W n ty   ddlm} Y nw || |}tjjjj	| t
j|}|S )Nr   )resource_filename)spyne._deploymentinfor   ImportErrorpkg_resourcesspyneutilautorelAutoReloaderFILESaddospathabspath)nsfnr   resfnr    r   S/var/www/html/LicenciasMIG/venv/lib/python3.10/site-packages/spyne/util/resource.pyget_resource_path   s   
r   c                 C   s   t t| |dS Nrb)openr   )r   r   r   r   r   get_resource_file%   s   r   c                 C   s4   t | |}|d u rt|d S t|d |S r   )r   r   readdecode)r   r   encr   r   r   r   get_resource_file_contents)   s   
r   c                 C   $   ddl m} |t| |}| S )Nr   )etree)lxmlr   parser   getroot)r   r   r   retvalr   r   r   parse_xml_resource2      r#   c                 C   r   )Nr   html)r   r&   r    r   r!   r   r   r&   r"   r   r   r   parse_html_resource:   r$   r(   c                 C   s.   ddl m} |jt| |dd}d|jd< |S )Nr   r%   z
spyne-root)create_parent zspyne-tagbag)r   r&   fragment_fromstringr   attribr'   r   r   r   parse_cloth_resourceB   s   
r-   )N)
os.pathr   spyne.util.autorelr   r   r   r   r#   r(   r-   r   r   r   r   <module>   s   
	