diff options
-rw-r--r-- | scilo/scilo.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/scilo/scilo.py b/scilo/scilo.py index f984064..8e594bd 100644 --- a/scilo/scilo.py +++ b/scilo/scilo.py @@ -17,7 +17,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License
along with scilo. If not, see <http://www.gnu.org/licenses/>.
'''
-import numpy as np
+import numpy
import os
import glob
import npy
@@ -26,9 +26,9 @@ class scilo: def __init__(self, path):
self.mtimedb = None
self.path = os.path.abspath(path)
+ self.name = os.path.basename(self.path)
self.settings = npy.settings(self.path)
- exit(0)
-
+ print("Loading dataset: %s" % (self.name))
if not os.path.exists(path):
os.mkdir(os.path.abspath(self.settings.path))
for key in self.settings.directories.iterkeys():
@@ -40,6 +40,7 @@ class scilo: for key in self.settings.directories.iterkeys():
d = os.path.join(self.path, key)
self.settings.directories[key] = d
+ self.cache = npy.cache(**self.settings.directories)
def __getitem__(self, key):
return self.settings.directories[key]
@@ -59,5 +60,6 @@ class scilo: import shutil
shutil.copy2(src, dest)
self.mtimedb = npy.mtimedb(**self.settings.directories)
+ self.cache.populate()
return True
\ No newline at end of file |