code: def get_app_dir(app):
      
      path = __app_dirs__.get(app)
      if path is not None:
          return path
      else:
          p = app.split('.')
          try:
              path = pkg.resource_filename(p[0], '')
          except ImportError as e:
              log.error("Can't import app %s" % app)
              log.exception(e)
              path = ''
          if len(p) > 1:
              path = os.path.join(path, *p[1:])
          
          __app_dirs__[app] = path
          return path
docs: Get an app's directory