def button_apply_callback(self, sender):
        if self.woffs_folder is not None:
            _woffs_paths = walk(self.woffs_folder, 'woff')
            if len(_woffs_paths) > 0:
                # set ufos folder
                if self.ufos_folder is None:
                    self.ufos_folder = self.woffs_folder
                # print settings
                boolstring = ("False", "True")
                print 'batch generating ufos for all woffs in folder...\n'
                print '\twoffs folder: %s' % self.woffs_folder
                print '\tufos folder: %s' % self.ufos_folder
                print
                # batch convert
                self.w.bar.start()
                for woff_path in _woffs_paths:
                    print '\tcreating ufo from %s...' % os.path.split(woff_path)[1]
                    woff = OpenFont(woff_path, showUI=True) # does not work without UI
                    ufo_file = os.path.splitext(os.path.split(woff_path)[1])[0] + '.ufo'
                    ufo_path = os.path.join(self.ufos_folder, ufo_file)
                    woff.save(ufo_path)
                    # close
                    woff.close()
                    print '\t\tufo path: %s' % ufo_path
                    print '\t\tconversion sucessful? %s\n' % os.path.exists(ufo_path)
                # done
                self.w.bar.stop()
                print
                print '...done.\n'
        # no font in folder
        else:
            print no_font_in_folder
dataset/ETHPy150Open gferreira/hTools2/Lib/hTools2/dialogs/folder/woffs2ufos.py/WOFFsToUFOsDialog.button_apply_callback/original