o
    OZŽhã  ã                   @   sN   d dl Z d dlZd dlmZmZ dd„ Zdd„ Zdd„ Zed	kr%eƒ  dS dS )
é    N)ÚquoteÚ
urlunparsec                 c   s2    t j | ¡\} }|rt| ƒE d H  |V  d S d S )N)ÚosÚpathÚsplitÚ	_iterpath)r   Úlast© r	   úC/var/www/auris/lib/python3.10/site-packages/pygame/docs/__main__.pyr      s   €
þr   c                  C   s0   t j t j t¡¡} t j | dd¡}t j |¡S )NÚ	generatedú
index.html)r   r   ÚdirnameÚabspathÚ__file__ÚjoinÚexists)Úpkg_dirÚ	main_pager	   r	   r
   Úhas_local_docs   s   r   c                  C   sŒ   t j t j t¡¡} t j | dd¡}t j |¡r=td t|ƒ¡ƒ}t j 	t¡\}}|r2|› d|› }t
dd|dddfƒ}nd}t |¡ d S )Nr   r   ú/ÚfileÚ zhttps://www.pygame.org/docs/)r   r   r   r   r   r   r   r   r   Ú
splitdriver   Ú
webbrowserÚopen)r   r   Zurl_pathÚdriveÚrestÚurlr	   r	   r
   Ú	open_docs   s   r   Ú__main__)	r   r   Úurllib.parser   r   r   r   r   Ú__name__r	   r	   r	   r
   Ú<module>   s   
ÿ