data.py
changeset 7 0f9cae2d7147
parent 6 57e8168ba8c4
child 8 46d36bc33086
equal deleted inserted replaced
6:57e8168ba8c4 7:0f9cae2d7147
     1 """
       
     2     Functions to load data from various sources
       
     3 """
       
     4 
       
     5 import imp
       
     6 
       
     7 def load_py (name, path) :
       
     8     """
       
     9         Load a python file from the given filesystem path, returning the module itself.
       
    10 
       
    11         The "name" of the module must be given, it should be something sane and unique...
       
    12     """
       
    13 
       
    14     # just load it and return
       
    15     return imp.load_source(name, path)
       
    16