Downloading a file form a displayed table

Lele Gaifax lele at metapensiero.it
Tue Mar 5 06:29:25 EST 2013


Νίκος Γκρ33κ <nikos.gr33k at gmail.com> writes:

> How is this lien supposed to be written do to iterate over a list of filenames?
>
> for filename in list( os.walk(path) ):
>
> i tried the above but still it doesn't work out.

Please learn how Python itself can help you:

    $ python
    Python 2.7.3 (default, Jan  2 2013, 13:56:14) 
    [GCC 4.7.2] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import os
    >>> help(os.walk)
    Help on function walk in module os:

    walk(top, topdown=True, onerror=None, followlinks=False)
        Directory tree generator.
        ...
        Example:

        import os
        from os.path import join, getsize
        for root, dirs, files in os.walk('python/Lib/email'):
           ...

In general, the builtin help() function displays the documentation for
either a single function or a whole module.

ciao, lele.
-- 
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
lele at metapensiero.it  |                 -- Fortunato Depero, 1929.




More information about the Python-list mailing list