Logo Search packages:      
Sourcecode: distribute version File versions  Download package

def pkg_resources::yield_lines (   strs  ) 

Yield non-empty/non-comment lines of a ``basestring`` or sequence

Definition at line 1840 of file pkg_resources.py.

01840                      :
    """Yield non-empty/non-comment lines of a ``basestring`` or sequence"""
    if isinstance(strs,basestring):
        for s in strs.splitlines():
            s = s.strip()
            if s and not s.startswith('#'):     # skip blank lines/comments
                yield s
    else:
        for ss in strs:
            for s in yield_lines(ss):
                yield s

LINE_END = re.compile(r"\s*(#.*)?$").match         # whitespace and comment


Generated by  Doxygen 1.6.0   Back to index