def find(self):
lastbuf = "<STR_LIT>"<EOL>while <NUM_LIT:0> < self._fp.tell():<EOL><INDENT>buf = self._read()<EOL>bufpos = (buf + lastbuf).rfind(self._needle)<EOL>if bufpos > -<NUM_LIT:1>:<EOL><INDENT>filepos = self._fp.tell() + bufpos<EOL>self._fp.seek(filepos)<EOL>return filepos<EOL><DEDENT>lastbuf = buf[:len(self._needle)]<EOL><DEDENT>return -<NUM_LIT:1><EOL>
Returns the position of the first occurence of needle.
If the needle was not found, -1 is returned.

:rtype : int