(self, mode="rb")
Read file 1st line to a buffer
Read file 1st line to a buffer
Read file 1st line to a buffer
def get1stline(self, mode="rb"):
        """Read file 1st line to a buffer"""
        try:
            filep = open(self.filename, mode)
        except (IOError, OSError, TypeError):
            return ""
        else:
            buf = filep.readline().strip()
            filep.close()
            return buf
def get1stline ( self , mode = "rb" ) : try : filep = open ( self . filename , mode ) except ( IOError , OSError , TypeError ) : return "" else : buf = filep . readline ( ) . strip ( ) filep . close ( ) return buf