pynes/analyzer.py
def code_line_generator(code):
    ''' A generator for lines from a file/string, keeping the \n at end '''
    if isinstance(code, unicode):
        stream = StringIO(code)
    elif isinstance(code, str):
        stream = BytesIO(code)
    else:
        stream = code # Should be a file input stream, already

    while True:
        line = stream.readline()
        if line:
            yield line
        else: # Line is empty (without \n) at EOF
            break
 A generator for lines from a file/string, keeping the \n at end 
A generator for lines from a file/string, keeping the \n at end
A generator for lines from a file / string keeping the \ n at end
def code_line_generator(code):
    if isinstance(code, unicode):
        stream = StringIO(code)
    elif isinstance(code, str):
        stream = BytesIO(code)
    else:
        stream = code 
    while True:
        line = stream.readline()
        if line:
            yield line
        else: 
            break
def code_line_generator ( code ) : if isinstance ( code , unicode ) : stream = StringIO ( code ) elif isinstance ( code , str ) : stream = BytesIO ( code ) else : stream = code while True : line = stream . readline ( ) if line : yield line else : break
A generator for lines from a file/string, keeping the \n at end
A generator for lines from a file / string keeping the \ n at end
''' A generator for lines from a file/string, keeping the \n at end ''' # Should be a file input stream, already # Line is empty (without \n) at EOF
code