@staticmethod
    def from_directory(path, verbosity=1):
        """Static factory method for reading an EegSubject object from a subdirectory of "eeg_full."

        Keyword arguments:
        path -- path to a UCI EEG database subject folder
        verbosity -- level of verbosity
        """

        if verbosity > 0:
            sys.stdout.write('Reading EegSubject from directory ' + path)
            if verbosity != 1:
                sys.stdout.write('\n')
            else:
                sys.stdout.write(':')
        m = re.match('.*/?(co\d(a|c)\d\d\d\d\d\d\d)', path)
        subject_id = m.group(1)
        alcoholic = (m.group(2)=='a')
        filenames = os.listdir(path)
        trials_data = []
        for filename in filenames:
            if verbosity > 1:
                sys.stdout.write('  reading EegTrial from ' + filename + '...')
            else:
                sys.stdout.write('.')
            try:
                trials_data.append(EegTrial.from_file(os.path.join(path, filename)))
            except Exception as e:
                sys.stdout.write('ERROR: could not read EegTrial from file: ' + str(e) + '\n')
            else:
                if verbosity > 1:
                    sys.stdout.write('SUCCESS\n')
        sys.stdout.write('\n')

        return EegSubject(subject_id=subject_id, alcoholic=alcoholic, trials_data=trials_data)
dataset/ETHPy150Open turambar/pyDatasets/pydatasets/uci/eeg.py/EegSubject.from_directory/operator `>` -> `!=`