file_automaton.py
def prepare(self, list_path_input):
        """Retrieve input files and copy them to temporary directory"""

        # Prepare temporary directories
        self.dir_tmp_run = tempfile.mkdtemp(
            dir=self.dir_tmp_root, prefix="automaton_")

        self.dir_tmp_run_in = os.path.join(self.dir_tmp_run, "in")
        self.dir_tmp_run_out = os.path.join(self.dir_tmp_run, "out")

        self.logger.debug("Creating directory %s" % self.dir_tmp_run_in)
        os.makedirs(self.dir_tmp_run_in)

        self.logger.debug("Creating directory %s" % self.dir_tmp_run_out)
        os.makedirs(self.dir_tmp_run_out)

        # Move input files to temporary directory
        list_path_prepared = []

        for path_input in list_path_input:

            path_tmp_in = os.path.join(
                self.dir_tmp_run_in, os.path.basename(path_input))

            self.logger.debug("Moving %s to %s" % (path_input, path_tmp_in))
            shutil.move(path_input, path_tmp_in, shutil.copyfile)

            list_path_prepared.append(path_tmp_in)

        return list_path_prepared
Retrieve input files and copy them to temporary directory
Retrieve input files and copy them to temporary directory
Retrieve input files and copy them to temporary directory
def prepare(self, list_path_input):
        self.dir_tmp_run = tempfile.mkdtemp(
            dir=self.dir_tmp_root, prefix="automaton_")
        self.dir_tmp_run_in = os.path.join(self.dir_tmp_run, "in")
        self.dir_tmp_run_out = os.path.join(self.dir_tmp_run, "out")
        self.logger.debug("Creating directory %s" % self.dir_tmp_run_in)
        os.makedirs(self.dir_tmp_run_in)
        self.logger.debug("Creating directory %s" % self.dir_tmp_run_out)
        os.makedirs(self.dir_tmp_run_out)
        list_path_prepared = []
        for path_input in list_path_input:
            path_tmp_in = os.path.join(
                self.dir_tmp_run_in, os.path.basename(path_input))
            self.logger.debug("Moving %s to %s" % (path_input, path_tmp_in))
            shutil.move(path_input, path_tmp_in, shutil.copyfile)
            list_path_prepared.append(path_tmp_in)
        return list_path_prepared
def prepare ( self , list_path_input ) : self . dir_tmp_run = tempfile . mkdtemp ( dir = self . dir_tmp_root , prefix = "automaton_" ) self . dir_tmp_run_in = os . path . join ( self . dir_tmp_run , "in" ) self . dir_tmp_run_out = os . path . join ( self . dir_tmp_run , "out" ) self . logger . debug ( "Creating directory %s" % self . dir_tmp_run_in ) os . makedirs ( self . dir_tmp_run_in ) self . logger . debug ( "Creating directory %s" % self . dir_tmp_run_out ) os . makedirs ( self . dir_tmp_run_out ) list_path_prepared = [ ] for path_input in list_path_input : path_tmp_in = os . path . join ( self . dir_tmp_run_in , os . path . basename ( path_input ) ) self . logger . debug ( "Moving %s to %s" % ( path_input , path_tmp_in ) ) shutil . move ( path_input , path_tmp_in , shutil . copyfile ) list_path_prepared . append ( path_tmp_in ) return list_path_prepared
Retrieve input files and copy them to temporary directory
Retrieve input files and copy them to temporary directory
"""Retrieve input files and copy them to temporary directory""" # Prepare temporary directories # Move input files to temporary directory
self
list_path_input