예제 #1
0
 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)
예제 #2
0
파일: expand_CSS.py 프로젝트: Tapyr/tapyr
 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)
예제 #3
0
 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
예제 #4
0
 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)
예제 #5
0
 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)
예제 #6
0
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)
        ]
예제 #7
0
파일: Mailbox.py 프로젝트: Tapyr/tapyr
 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
예제 #8
0
파일: subdirs.py 프로젝트: Tapyr/tapyr
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)
        ]