@path_required<EOL><INDENT>def pull_file(self, relativePath, pull=None, update=True, ntrials=<NUM_LIT:3>):<DEDENT>
assert isinstance(ntrials, int), "<STR_LIT>"<EOL>assert ntrials><NUM_LIT:0>, "<STR_LIT>"<EOL>relativePath = self.to_repo_relative_path(path=relativePath, split=False)<EOL>realPath     = os.path.join(self.__path,relativePath)<EOL>fPath, fName = os.path.split(realPath)<EOL>isRepoFile,fileOnDisk, infoOnDisk, classOnDisk = self.is_repository_file(relativePath)<EOL>if not isRepoFile:<EOL><INDENT>fileOnDisk  = ["<STR_LIT>","<STR_LIT>"][fileOnDisk]<EOL>infoOnDisk  = ["<STR_LIT>","<STR_LIT>"%self.__fileInfo%fName][infoOnDisk]<EOL>classOnDisk = ["<STR_LIT>","<STR_LIT>"%self.__fileClass%fName][classOnDisk]<EOL>assert False, "<STR_LIT>"%(relativePath,fileOnDisk,infoOnDisk,classOnDisk)<EOL><DEDENT>assert fileOnDisk, "<STR_LIT>"%(relativePath,)<EOL>if not infoOnDisk:<EOL><INDENT>if pull is not None:<EOL><INDENT>warnings.warn("<STR_LIT>"%(self.__fileInfo%fName))<EOL><DEDENT>else:<EOL><INDENT>raise Exception("<STR_LIT>"%(relativePath,(self.__fileInfo%fName)))<EOL><DEDENT><DEDENT>LF =  Locker(filePath=None, lockPass=str(uuid.uuid1()), lockPath=os.path.join(fPath,self.__fileLock%fName))<EOL>acquired, code = LF.acquire_lock()<EOL>if not acquired:<EOL><INDENT>error = "<STR_LIT>"%(code,relativePath)<EOL>return False, error<EOL><DEDENT>for _trial in range(ntrials):<EOL><INDENT>error = None<EOL>try:<EOL><INDENT>if pull is not None:<EOL><INDENT>pull = get_pull_method(pull)<EOL><DEDENT>else:<EOL><INDENT>with open(os.path.join(fPath,self.__fileInfo%fName), '<STR_LIT:rb>') as fd:<EOL><INDENT>info = pickle.load(fd)<EOL><DEDENT>pull = info['<STR_LIT>']<EOL><DEDENT>my_exec( pull.replace("<STR_LIT>", str(realPath) ), locals=locals(), globals=globals(), description='<STR_LIT>' )<EOL><DEDENT>except Exception as err:<EOL><INDENT>LF.release_lock()<EOL>m = str(pull).replace("<STR_LIT>", str(realPath) )<EOL>error = "<STR_LIT>"%(m,err)<EOL>if self.DEBUG_PRINT_FAILED_TRIALS: print("<STR_LIT>"%(_trial, inspect.stack()[<NUM_LIT:1>][<NUM_LIT:3>], str(error)))<EOL><DEDENT>else:<EOL><INDENT>break<EOL><DEDENT><DEDENT>LF.release_lock()<EOL>assert error is None, "<STR_LIT>"%(ntrials, error)<EOL>return locals()['<STR_LIT>']<EOL>
Pull a file's data from the Repository.

:Parameters:
    #. relativePath (string): The relative to the repository path from
       where to pull the file.
    #. pull (None, string): The pulling method.
       If None, the pull method saved in the file info will be used.
       If a string is given, the string should include all the necessary
       imports, a '$FILE_PATH' that replaces the absolute file path when
       the dumping will be performed and finally a PULLED_DATA variable.
       e.g "import numpy as np; PULLED_DATA=np.loadtxt(fname='$FILE_PATH')"
    #. update (boolean): If pull is not None, Whether to update the pull
       method stored in the file info by the given pull method.
    #. ntrials (int): After aquiring all locks, ntrials is the maximum
       number of trials allowed before failing.
       In rare cases, when multiple processes
       are accessing the same repository components, different processes
       can alter repository components between successive lock releases
       of some other process. Bigger number of trials lowers the
       likelyhood of failure due to multiple processes same time
       alteration.

:Returns:
    #. data (object): The pulled data from the file.