Your IP : 216.73.216.213


Current Path : /opt/alt/python35/lib/python3.5/site-packages/google/apputils/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib/python3.5/site-packages/google/apputils/__pycache__/resources.cpython-35.pyc



A��];�@s^dZdZddlZddlZdd�Zdd�Zdd	�Zd
add�ZdS)
z�Wrapper around setuptools' pkg_resources with more Google-like names.

This module is not very useful on its own, but many Google open-source projects
are used to a different naming scheme, and this module makes the transition
easier.
z$dborowitz@google.com (Dave Borowitz)�NcCs%|jdd�\}}|||�S)a�Call a pkg_resources function.

  Args:
    func: A function from pkg_resources that takes the arguments
          (package_or_requirement, resource_name); for more info,
          see http://peak.telecommunity.com/DevCenter/PkgResources
    name: A name of the form 'module.name:path/to/resource'; this should
          generally be built from __name__ in the calling module.

  Returns:
    The result of calling the function on the split resource name.
  �:�)�split)�func�name�pkg_name�
resource_name�r	�J/opt/alt/python35/lib/python3.5/site-packages/google/apputils/resources.py�_Calls
rcCsttj|�S)z&Get a resource as a string; see _Call.)r�
pkg_resources�resource_string)rr	r	r
�GetResource.srcCsttj|�S)z0Get a resource as a file-like object; see _Call.)rr�resource_stream)rr	r	r
�GetResourceAsFile3srFcCs,tstjtj�dattj|�S)z)Get a filename for a resource; see _Call.T)�_extracted_files�atexit�registerr�cleanup_resourcesr�resource_filename)rr	r	r
�GetResourceFilename;sr)	�__doc__�
__author__rrrrrrrr	r	r	r
�<module>s