Beispiel #1
0
    def __init__(self, filename, sepn=None, use_sa=1, print_flag=0):
        self.thisown = 0
        if sepn == None:
            sepn = []

        # Need to change directory because the C code works only on UNIX
        old_workdir = os.getcwd()
        new_workdir, new_filename = os.path.split(filename)
        if len(new_workdir):
            os.chdir(new_workdir)

        self.this = FS.new_Index(new_filename, sepn, use_sa, print_flag)

        # Return to old working directory
        if len(new_workdir):
            os.chdir(old_workdir)

        self.thisown = 1
        self.__dict__.update(FS.Index_get_data(self))
Beispiel #2
0
def _get_ix_data(I):
    return FS.Index_get_data(I)