Esempio n. 1
0
section = 'dpwe_builder'
config.add_section(section)

if config_file:
    if len(config.read(config_file)) == 0:
        raise IOError(errno.ENOENT, "Cannot read config file", config_file)

density = config.getint(section, 'density')
fanout = config.getint(section, 'fanout')
bucketsize = config.getint(section, 'bucketsize')
ncores = config.getint(section, 'ncores')

print(sys.argv[0], "density:", density, "fanout:", fanout, "bucketsize:",
      bucketsize, "ncores:", ncores)

# Ensure the database directory exists
audfprint.ensure_dir(dir4db)

# Run the command
argv = [
    "audfprint", "new", "-d",
    os.path.join(dir4db, "data.fpdb"), "--density",
    str(density), "--fanout",
    str(fanout), "--bucketsize",
    str(bucketsize), "--ncores",
    str(ncores), "--list", fileList4db
]

# Run audfprint
audfprint.main(argv)
Esempio n. 2
0
config = ConfigParser.ConfigParser(defaults)
section = 'dpwe_builder'
config.add_section(section)

if config_file:
    if len(config.read(config_file)) == 0:
        raise IOError(errno.ENOENT, "Cannot read config file", config_file)

density = config.getint(section, 'density')
fanout = config.getint(section, 'fanout')
bucketsize = config.getint(section, 'bucketsize')
ncores = config.getint(section, 'ncores')

print sys.argv[0], "density:", density, "fanout:", fanout, \
    "bucketsize:", bucketsize, "ncores:", ncores

# Ensure the database directory exists
audfprint.ensure_dir(dir4db)

# Run the command
argv = ["audfprint", "new",
        "-d", os.path.join(dir4db, "data.fpdb"),
        "--density", str(density),
        "--fanout", str(fanout),
        "--bucketsize", str(bucketsize),
        "--ncores", str(ncores),
        "--list", fileList4db]

# Run audfprint
audfprint.main(argv)