From 2f8a3cc89872becc0a8b18606a3a08f279c62676 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 16 Jan 2013 08:32:12 -0500 Subject: Deprecated; aggregate no longer uses glob --- scilo/scilo.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/scilo/scilo.py b/scilo/scilo.py index 8e594bd..b358312 100644 --- a/scilo/scilo.py +++ b/scilo/scilo.py @@ -19,7 +19,8 @@ along with scilo. If not, see . ''' import numpy import os -import glob +import sys +import logging import npy class scilo: @@ -45,14 +46,17 @@ class scilo: def __getitem__(self, key): return self.settings.directories[key] - def aggregate(self, globular, move=True): - sources = glob.glob(globular) + def aggregate(self, *args, **kwargs): + # Horrible black magic to turn a nested list into a list + sources = [ value for item in args for value in item] + if not sources: return False + for src in sources: dest = os.path.join(self.settings.directories['data'], os.path.basename(src)) src = os.path.abspath(src) - if move: + if kwargs['move']: if os.rename(src, dest) == False: continue else: -- cgit