Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #40519

Re: Downloading a file form a displayed table

From Lele Gaifax <lele@metapensiero.it>
Subject Re: Downloading a file form a displayed table
Date 2013-03-05 12:29 +0100
Organization Nautilus Entertainments
References <f99ae3d5-6f1f-4dfc-84da-78b758a5147a@googlegroups.com> <mailman.2875.1362477114.2939.python-list@python.org> <91d6d661-1e6b-4365-8fa3-e46425705d78@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.2878.1362482981.2939.python-list@python.org> (permalink)

Show all headers | View raw


Νίκος Γκρ33κ <nikos.gr33k@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@metapensiero.it  |                 -- Fortunato Depero, 1929.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Downloading a file form a displayed table Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-05 01:00 -0800
  Re: Downloading a file form a displayed table Dave Angel <davea@davea.name> - 2013-03-05 04:45 -0500
    Re: Downloading a file form a displayed table Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-05 01:48 -0800
      Re: Downloading a file form a displayed table Dave Angel <davea@davea.name> - 2013-03-05 05:05 -0500
    Re: Downloading a file form a displayed table Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-05 01:48 -0800
  Re: Downloading a file form a displayed table Dave Angel <davea@davea.name> - 2013-03-05 04:51 -0500
    Re: Downloading a file form a displayed table Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-05 02:24 -0800
      Re: Downloading a file form a displayed table Lele Gaifax <lele@metapensiero.it> - 2013-03-05 12:29 +0100
    Re: Downloading a file form a displayed table Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-05 02:24 -0800
  Re: Downloading a file form a displayed table Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-05 05:01 -0800
    Re: Downloading a file form a displayed table Joel Goldstick <joel.goldstick@gmail.com> - 2013-03-05 08:38 -0500
    Re: Downloading a file form a displayed table "Vytas D." <vytasd2013@gmail.com> - 2013-03-05 13:38 +0000
      Re: Downloading a file form a displayed table Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-05 06:37 -0800
      Re: Downloading a file form a displayed table Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-03-05 06:37 -0800
  Re: Downloading a file form a displayed table Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-03-05 14:04 +0000

csiph-web