from pkg_resources import resource_string, resource_listdir
print(resource_listdir('proj.resources.images', ''))
print(resource_string('proj.resources.images', 'pic2.png').encode('base64'))
Managing resources in a Python project