Skip to content

Instantly share code, notes, and snippets.

@hartym
Created February 16, 2012 13:12
Show Gist options
  • Select an option

  • Save hartym/1844743 to your computer and use it in GitHub Desktop.

Select an option

Save hartym/1844743 to your computer and use it in GitHub Desktop.
namespace package declaration
# this is a namespace package
try:
import pkg_resources
pkg_resources.declare_namespace(__name__)
except ImportError:
import pkgutil
__path__ = pkgutil.extend_path(__path__, __name__)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment