A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2015-May/140017.html below:

[Python-Dev] Scandir module's C code updated to Python 3.5 code

[Python-Dev] Scandir module's C code updated to Python 3.5 code [Python-Dev] Scandir module's C code updated to Python 3.5 codeBen Hoyt benhoyt at gmail.com
Fri May 15 21:30:34 CEST 2015
Hi folks,

With os.scandir() now in the Python 3.5 stdlib, I just thought I'd let
folks know that I've released the scandir module version 1.0. So this
is now basically a copy-n-paste of the C code that went into CPython
3.5's posixmodule.c with the necessary changes to make it work or
Python 2.x (2.6+).

You can use the following import to pick os.scandir/os.walk if on
Python 3.5+ or the scandir module version otherwise:

    try:
        from os import scandir, walk
    except ImportError:
        from scandir import scandir, walk

I've tested it and it all looks good and performs well, but please let
me know if you have any issues!

* PyPI: https://pypi.python.org/pypi/scandir
* Github project: https://github.com/benhoyt/scandir

Would love to hear any success/speedup stories, too!

-Ben
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4