diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2013-01-16 08:32:12 -0500 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2013-01-16 08:32:12 -0500 |
commit | 2f8a3cc89872becc0a8b18606a3a08f279c62676 (patch) | |
tree | 55d9e645080439e8879e5ff414d09737623e08b5 /scilo | |
parent | f6032cbb60983cb36a1f45d284178d8dbc1c0298 (diff) | |
download | scilo-2f8a3cc89872becc0a8b18606a3a08f279c62676.tar.gz |
Deprecated; aggregate no longer uses glob
Diffstat (limited to 'scilo')
-rw-r--r-- | scilo/scilo.py | 12 |
1 files 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 <http://www.gnu.org/licenses/>. '''
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:
|