def find_templates(cls, polling, directory, recursive=False): for file in os.listdir_full(directory): if os.path.isdir(file): if recursive: cls.find_templates(file, recursive=True) if file.endswith(".css_template") and not "#" in file: cls(file, polling=polling)
def find_templates (cls, polling, directory, recursive = False) : for file in os.listdir_full (directory) : if os.path.isdir (file) : if recursive : cls.find_templates (file, recursive = True) if file.endswith (".css_template") and not "#" in file : cls (file, polling = polling)
def _files (cls, path) : for f in sos.listdir_full (path) : d, n = sos.path.split (f) if not (n [0] in ".," or sos.path.isdir (f)) : yield f
def _clear_dir (self) : for fod in sos.listdir_full (self.media_dir) : if sos.path.isdir (fod) : sos.rmdir (fod, True) else : sos.unlink (fod)
def subdirs(of_dir=None): """Return list of all subdirectories contained in `of_dir`""" return \ [ f for f in sos.listdir_full (of_dir) if sos.path.isdir (f) and not sos.path.islink (f) ]
def subdirs (of_dir = None) : """Return list of all subdirectories contained in `of_dir`""" return \ [ f for f in sos.listdir_full (of_dir) if sos.path.isdir (f) and not sos.path.islink (f) ]