shlax/podctl/pod.py
2020-01-24 19:26:43 +01:00

12 lines
300 B
Python

import collections
import importlib.util
class Pod(collections.UserDict):
@classmethod
def factory(cls, path):
spec = importlib.util.spec_from_file_location('pod', path)
pod = importlib.util.module_from_spec(spec)
spec.loader.exec_module(pod)
return pod.pod