Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(11)  |  Call(6)  |  Derive(0)  |  Import(5)
Find all files under 'dir' and return the list of full filenames
(relative to 'dir').

        def findall(dir = os.curdir):
    """Find all files under 'dir' and return the list of full filenames
    (relative to 'dir').
    """
    from stat import ST_MODE, S_ISREG, S_ISDIR, S_ISLNK

    list = []
    stack = [dir]
    pop = stack.pop
    push = stack.append

    while stack:
        dir = pop()
        names = os.listdir(dir)

        for name in names:
            if dir != os.curdir:        # avoid the dreaded "./" syndrome
                fullname = os.path.join(dir, name)
            else:
                fullname = name

            # Avoid excess stat calls -- just one will do, thank you!
            stat = os.stat(fullname)
            mode = stat[ST_MODE]
            if S_ISREG(mode):
                list.append(fullname)
            elif S_ISDIR(mode) and not S_ISLNK(mode):
                push(fullname)

    return list
        


src/p/y/pycerberus-0.5/setup.py   pycerberus(Download)
            from setuptools.command.egg_info import egg_info
            from setuptools.command.build_py import Mixin2to3
            from distutils.filelist import findall
 
            class to_python3(egg_info, Mixin2to3):
                def sources_to_convert(self):
                    file_names = []
                    sources = findall(dir='pycerberus')
                    tests = findall(dir='tests')
                    for file_name in sources + tests:

src/k/i/kiwi-gtk-1.9.38/kiwi/i18n/i18n.py   kiwi-gtk(Download)
 
from distutils.dep_util import newer
from distutils.filelist import FileList, findall
from optparse import OptionParser
import os
def _extract_rml_files(root):
    files = []
    for rml_file in sorted(findall(root)):
        if not rml_file.endswith('.rml'):
            continue

src/c/o/contrail_sansmodels-2.1.0/src/sans/models/__init__.py   contrail_sansmodels(Download)
 
import os
from distutils.filelist import findall
 
__version__ = "2.1.0"
    data_files = []
    path = get_data_path(media="media")
    for f in findall(path):
        data_files.append(('media/models_media', [f]))
    return data_files

src/t/h/Thalassa-1.2/setup.py   Thalassa(Download)
from distutils.core import Command
from distutils.command.build import build as _build_orig
from distutils.filelist import findall
import os
from os.path import isdir, exists, join, splitext, split, dirname
    data_files = matplotlib.get_py2exe_datafiles()
    data_files.append((join('mpl_toolkits', 'basemap', 'data'),
                       findall(join(dirname(basemap.__file__), 'data')) ))
    kwargs['windows'] = [{'script': "bin/thalassa",
                          'data_files': data_files}],

src/4/s/4Suite-XML-1.0.2/Ft/Lib/DistExt/Dist.py   4Suite-XML(Download)
            else:
                source_list = filelist.FileList()
                source_list.extend(filelist.findall())
                # Remove files that don't really belong in the file list.
                # Note the leading slash (\) before os.sep substitutions. It is

src/o/p/openclass-HEAD/compile.py   openclass(Download)
from distutils.core import setup
from distutils.filelist import findall
 
import py2exe
import glob