From ac33c34d0181557dfe4a75faf0290850d2846d15 Mon Sep 17 00:00:00 2001 From: astock <astock@dam.brown.edu> Date: Fri, 25 Sep 2009 20:30:53 -0400 Subject: [PATCH] Batch job submission: be able to copy files from subdirectories. --- pytools/batchjob.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pytools/batchjob.py b/pytools/batchjob.py index fa5ca65..d681f02 100644 --- a/pytools/batchjob.py +++ b/pytools/batchjob.py @@ -51,9 +51,10 @@ class BatchJob(object): % (sys.executable, main_file)) runscript.close() - _cp(main_file, os.path.join(self.path, main_file)) + from os.path import basename + _cp(main_file, os.path.join(self.path, basename(main_file))) for aux_file in aux_files: - _cp(aux_file, os.path.join(self.path, aux_file)) + _cp(aux_file, os.path.join(self.path, basename(aux_file))) def write_setup(self, lines): import os.path @@ -132,6 +133,8 @@ def guess_job_class(): return PBSJob + + class ConstructorPlaceholder: def __init__(self, classname, *args, **kwargs): self.classname = classname -- GitLab