How to use the zdict.easter_eggs.lookup_pyjokes function in zdict

To help you get started, we’ve selected a few zdict examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github zdict / zdict / zdict / zdict.py View on Github external
zdict.lookup(word)
    else:
        # user did use `-j`
        # If processes is None, os.cpu_count() is used.
        pool = Pool(args.jobs, init_worker)

        for word in args.words:
            futures = [
                pool.apply_async(lookup_string_wrapper,
                                 (dictionary_map[d], word, args))
                for d in args.dict
            ]
            results = [i.get() for i in futures]
            print(''.join(results))

    easter_eggs.lookup_pyjokes(word)