[Python-ideas] BetterWalk, a better and faster os.walk() for Python

Stefan Drees stefan at drees.name
Thu Nov 22 16:58:19 CET 2012


Hi Ben,

Am 22.11.12 12:39, schrieb Ben Hoyt:
> In the recent thread I started called "Speed up os.walk()..." [1] I
> was encouraged to create a module to flesh out the idea, so I present
> you with BetterWalk:
>
> https://github.com/benhoyt/betterwalk#readme
>
> ...
> In any case, I'd love it if folks could run the benchmark on their
> system (with and without -s) and comment further on the idea and API.
>

thanks a lot. I tried it out. Inside the git repo:

$> source /somepath/venv/bin/activate
$(venv)> python ./benchmark.py
Creating tree at ./benchtree: depth=4, num_dirs=5, num_files=50
Traceback (most recent call last):
   File "./benchmark.py", line 121, in <module>
     main()
   File "./benchmark.py", line 116, in main
     create_tree(tree_dir)
   File "./benchmark.py", line 26, in create_tree
     f.write(line * 20000)
TypeError: 'str' does not support the buffer interface
$(venv)> python -V
Python 3.3.0
$(venv)> python
Python 3.3.0 (default, Oct 24 2012, 11:01:23)
[GCC 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.65))]
  ...

Some better way to test it :?)

All the best,
Stefan.
>...
> [1] http://mail.python.org/pipermail/python-ideas/2012-November/017770.html
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> http://mail.python.org/mailman/listinfo/python-ideas
>




More information about the Python-ideas mailing list