def _reset_external(self, pth, old_pth):
    new_ext_fnames = []
    for (ext_file, output) in zip(self.external_fnames, self.external_output):
        if output:
            new_ext_file = ext_file
        else:
            fdir = os.path.dirname(ext_file)
            if (fdir == ''):
                fpth = os.path.abspath(os.path.join(old_pth, ext_file))
            else:
                fpth = ext_file
            ao = os.path.abspath(os.path.dirname(fpth))
            ep = os.path.abspath(pth)
            relp = os.path.relpath(ao, ep)
            new_ext_file = os.path.join(relp, os.path.basename(ext_file))
        new_ext_fnames.append(new_ext_file)
    self.external_fnames = new_ext_fnames
def _reset_external(self, pth, old_pth):
    new_ext_fnames = []
    for (ext_file, output) in zip(self.external_fnames, self.external_output):
        if output:
            new_ext_file = ext_file
        else:
            fdir = os.path.dirname(ext_file)
            if (fdir == ):
                fpth = os.path.abspath(os.path.join(old_pth, ext_file))
            else:
                fpth = ext_file
            ao = os.path.abspath(os.path.dirname(fpth))
            ep = os.path.abspath(pth)
            relp = os.path.relpath(ao, ep)
            new_ext_file = os.path.join(relp, os.path.basename(ext_file))
        new_ext_fnames.append(new_ext_file)
    self.external_fnames = new_ext_fnames