pipm/file_utils.py
def _new_line(filename):
    """
        append `\n` to the end of the file if it doesn't exist
    Args:
        filename:
    """
    with open(filename, "ab+") as f:
        # check for empty file
        f.seek(0)
        if f.read(1) == b"" and f.read() == b"":
            return
        try:
            f.seek(-1, os.SEEK_END)
            if f.read(1) != b"\n":
                f.write(b"\n")
        except OSError:
            pass

        append `\n` to the end of the file if it doesn't exist
    Args:
        filename:
    
append `\n` to the end of the file if it doesn't exist
append ` \ n ` to the end of the file if it doesn ' t exist
def _new_line(filename):
    with open(filename, "ab+") as f:
        f.seek(0)
        if f.read(1) == b"" and f.read() == b"":
            return
        try:
            f.seek(-1, os.SEEK_END)
            if f.read(1) != b"\n":
                f.write(b"\n")
        except OSError:
            pass
def _new_line ( filename ) : with open ( filename , "ab+" ) as f : f . seek ( 0 ) if f . read ( 1 ) == b"" and f . read ( ) == b"" : return try : f . seek ( - 1 , os . SEEK_END ) if f . read ( 1 ) != b"\n" : f . write ( b"\n" ) except OSError : pass
append `\n` to the end of the file if it doesn't exist
append ` \ n ` to the end of the file if it doesn ' t exist
"""
        append `\n` to the end of the file if it doesn't exist
    Args:
        filename:
    """ # check for empty file
filename
None