How to use the pyaux.runlib function in pyaux

To help you get started, we’ve selected a few pyaux 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 HoverHell / RedditImageGrab / img_scrap_stuff.py View on Github external
_log.debug("dhts: %r (of %r) urls to check", len(to_check), to_check_baselen)
    res = []
    for turl in to_check:
        try:
            stuff = do_horrible_thing_func(turl, base_url=url)
        except GetError:
            continue  ## ... will be logged anyway.
        if stuff:
            data, resp = stuff[:2]
            res.append((turl, data, dict(resp=resp)))
    _log.debug("dhts: %r images found", len(res))
    return to_check, res


if __name__ == '__main__':
    pyaux.runlib.init_logging(level=1)
    logging.getLogger('requests.packages.urllib3.connectionpool').setLevel(21)
    pyaux.use_exc_ipdb()
    cres = do_horrible_things(sys.argv[1])
    import IPython
    IPython.embed(banner1="`cres`.")
github HoverHell / RedditImageGrab / scrap_wrongies.py View on Github external
def main():
    try:
        import pyaux.runlib
        pyaux.runlib.init_logging(level=1)
        pyaux.use_exc_ipdb()
    except Exception:
        pass
    logging.getLogger('requests.packages.urllib3.connectionpool').setLevel(21)
    res = do_scrap_wrongies()
    return

pyaux

A collection of small useful helpers.

MIT
Latest version published 7 months ago

Package Health Score

50 / 100
Full package analysis