def __init__(self, filepath_or_buffer):
err_msg = "<STR_LIT>"<EOL>try:<EOL><INDENT>import xlrd<EOL><DEDENT>except ImportError:<EOL><INDENT>raise ImportError(err_msg)<EOL><DEDENT>else:<EOL><INDENT>if xlrd.__VERSION__ < LooseVersion("<STR_LIT>"):<EOL><INDENT>raise ImportError(err_msg +<EOL>"<STR_LIT>" + xlrd.__VERSION__)<EOL><DEDENT><DEDENT>from pandas.io.excel._base import ExcelFile<EOL>if _is_url(filepath_or_buffer):<EOL><INDENT>filepath_or_buffer = urlopen(filepath_or_buffer)<EOL><DEDENT>elif not isinstance(filepath_or_buffer, (ExcelFile, xlrd.Book)):<EOL><INDENT>filepath_or_buffer, _, _, _ = get_filepath_or_buffer(<EOL>filepath_or_buffer)<EOL><DEDENT>if isinstance(filepath_or_buffer, xlrd.Book):<EOL><INDENT>self.book = filepath_or_buffer<EOL><DEDENT>elif hasattr(filepath_or_buffer, "<STR_LIT>"):<EOL><INDENT>if hasattr(filepath_or_buffer, '<STR_LIT>'):<EOL><INDENT>try:<EOL><INDENT>filepath_or_buffer.seek(<NUM_LIT:0>)<EOL><DEDENT>except UnsupportedOperation:<EOL><INDENT>pass<EOL><DEDENT><DEDENT>data = filepath_or_buffer.read()<EOL>self.book = xlrd.open_workbook(file_contents=data)<EOL><DEDENT>elif isinstance(filepath_or_buffer, str):<EOL><INDENT>self.book = xlrd.open_workbook(filepath_or_buffer)<EOL><DEDENT>else:<EOL><INDENT>raise ValueError('<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT>
Reader using xlrd engine.

        Parameters
        ----------
        filepath_or_buffer : string, path object or Workbook
            Object to be parsed.