Your IP : 216.73.216.213
A��]; � @ s^ d Z d Z d d l Z d d l Z d d � Z d d � Z d d � Z d
a d d � Z d S)
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)� Nc C s% | j d d � \ } } | | | � 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�_Call s
r c C s t t j | � S)z&Get a resource as a string; see _Call.)r �
pkg_resources�resource_string)r r r r
�GetResource. s r c C s t t j | � S)z0Get a resource as a file-like object; see _Call.)r r �resource_stream)r r r r
�GetResourceAsFile3 s r Fc C s, t s t j t j � d a t t j | � S)z)Get a filename for a resource; see _Call.T)�_extracted_files�atexit�registerr �cleanup_resourcesr �resource_filename)r r r r
�GetResourceFilename; s r ) �__doc__�
__author__r r r r r r r r r r r
�<module> s