File: py34compat.py

package info (click to toggle)
python-setuptools 44.1.1-1
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 3,536 kB
  • sloc: python: 25,461; ansic: 196; makefile: 88; xml: 14
file content (13 lines) | stat: -rw-r--r-- 245 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
import importlib

try:
    import importlib.util
except ImportError:
    pass


try:
    module_from_spec = importlib.util.module_from_spec
except AttributeError:
    def module_from_spec(spec):
        return spec.loader.load_module(spec.name)