def extract(self, output_dir):
        if not output_dir.endswith(':') and not os.path.exists(output_dir):
            os.mkdir(output_dir)

        num_files = len(self.namelist())

        # extract files to directory structure
        for i, name in enumerate(self.namelist()):
            if not name.endswith('/'):
                directory = os.path.dirname(name)
                if directory == '':
                    directory = None
                if directory:
                    directory = os.path.join(output_dir, directory)
                    if not os.path.exists(directory):
                        os.makedirs(directory)

                outfile = open(os.path.join(output_dir, name), 'wb')
                outfile.write(self.read(name))
                outfile.flush()
                outfile.close()
minimal: manage.py builtin commands fail if settings file (from argument) doesn't exist
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/grizzled/grizzled/io/__init__.py/Zip.extract--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.4/tests/regressiontests/admin_scripts/tests.py/ManageMinimalSettings.test_builtin_with_bad_settings