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

All Samples(6)  |  Call(4)  |  Derive(0)  |  Import(2)
Recursivly read a directory and return list of all files

        def get_files(dir):
    """
    Recursivly read a directory and return list of all files
    """
    files = []

    for (path, subdirs, new_files) in os.walk(dir):
        for new_file in new_files:
            files.append(os.path.join(path, new_file))

    return files
        


src/d/j/django-chuck-0.2.3/django_chuck/commands/install_modules.py   Django-Chuck(Download)
from django_chuck.commands.base import BaseCommand
import os
import sys
import shutil
from django_chuck.utils import append_to_file, get_files, get_template_engine, compile_template
 
        # For each file in the module dir
        for f in get_files(module.dir):
            if not "chuck_module.py" in f:
                # Absolute path to module file
        if (self.template_engine == "django_chuck.template.notch_interactive.engine" or not self.template_engine) and\
           not self.debug:
            for f in get_files(self.site_dir):
                template_engine.remove_keywords(f)
 

src/d/j/django-chuck-HEAD/django_chuck/commands/install_modules.py   django-chuck(Download)
from django_chuck.commands.base import BaseCommand
import os
import sys
import shutil
from django_chuck.utils import append_to_file, get_files, get_template_engine, compile_template
 
        # For each file in the module dir
        for f in get_files(module.dir):
            if not "chuck_module.py" in f:
                # Absolute path to module file
        if (self.template_engine == "django_chuck.template.notch_interactive.engine" or not self.template_engine) and\
           not self.debug:
            for f in get_files(self.site_dir):
                template_engine.remove_keywords(f)