can't see the forest for the trees, that seems to be the problem,
thanks for pointing out the obvious ( that I couldn't see ) :-(
--
http://mail.python.org/mailman/listinfo/python-list
I am running 2.3.5
--
http://mail.python.org/mailman/listinfo/python-list
fuzzylollipop wrote:
> print sum([getsize(join(root, name)) for name in files]),
> print sum([getsize(join(root,name)) from name in files]),
Do you see the difference? ... for ... is the correct syntax, ... from ...
is what Python seems to complain about.
Peter
--
http://mail.python.org/mail
<[EMAIL PROTECTED]> wrote:
> the following code is from the Python 2.3.5 docs (
> http://www.python.org/doc/2.3.5/lib/os-file-dir.html )
>
> import os
> from os.path import join, getsize
> for root, dirs, files in os.walk('python/Lib/email'):
>print root, "consumes",
>print sum([getsize(jo
the following code is from the Python 2.3.5 docs (
http://www.python.org/doc/2.3.5/lib/os-file-dir.html )
import os
from os.path import join, getsize
for root, dirs, files in os.walk('python/Lib/email'):
print root, "consumes",
print sum([getsize(join(root, name)) for name in files]),