Development of an internal social media platform with personalised dashboards for students
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

util.py 346B

123456789101112
  1. # Copyright (c) 2016 Claudiu Popa <pcmanticore@gmail.com>
  2. try:
  3. import pkg_resources
  4. except ImportError:
  5. pkg_resources = None
  6. def is_namespace(modname):
  7. # pylint: disable=no-member; astroid issue #290, modifying globals at runtime.
  8. return (pkg_resources is not None
  9. and modname in pkg_resources._namespace_packages)