
    iu	                     \    d Z dgZddlZddlZ	 ddlmZmZ efdZ	y# e$ r	 d Zd ZY w xY w)ab  
pkgdata is a simple, extensible way for a package to acquire data file
resources.

The getResource function is equivalent to the standard idioms, such as
the following minimal implementation:

    import sys, os

    def getResource(identifier, pkgname=__name__):
        pkgpath = os.path.dirname(sys.modules[pkgname].__file__)
        path = os.path.join(pkgpath, identifier)
        return file(os.path.normpath(path), mode='rb')

When a __loader__ is present on the module given by __name__, it will defer
getResource to its get_data implementation and return it as a file-like
object (such as StringIO).
getResource    N)resource_streamresource_existsc                      y)zi
        A stub for when we fail to import this function.

        :return: Always returns False
        F )_package_or_requirement_resource_names     X/home/obispo/Crisostomo_bridge/mision_env/lib/python3.12/site-packages/pygame/pkgdata.pyr   r      s         c                     t         )z|
        A stub for when we fail to import this function.

        Always raises a NotImplementedError when called.
        )NotImplementedError)_package_of_requirementr	   s     r
   r   r   $   s
     "!r   c                    	 t        ||       rt        ||       S 	 t        j                  |   }t        |dd      }|t        t        |       d      t        j                  j                  t        j                  j                  |      |       }t        t        j                  j                  |      d      S # t        $ r Y w xY w)a<  
    Acquire a readable object for a given package name and identifier.
    An IOError will be raised if the resource can not be found.

    For example:
        mydata = getResource('mypkgdata.jpg').read()

    Note that the package name must be fully qualified, if given, such
    that it would be found in sys.modules.

    In some cases, getResource will return a real file object.  In that
    case, it may be useful to use its name attribute to get the path
    rather than use it as a file-like object.  For example, you may
    be handing data off to a C API.
    __file__Nz has no __file__!rb)r   r   r   sysmodulesgetattrOSErrorreprospathjoindirnameopennormpath)
identifierpkgnamemodpath_to_filer   s        r
   r   r   -   s    &7J/"7J77 0
 ++g
C3
D1Lc#456677<<5zBD   &--  s   B: :	CC)
__doc____all__r   r   pkg_resourcesr   r   ImportError__name__r   r   r   r
   <module>r&      sF   & / 
 	">( %-  .'  """s    ++