def accounts(self):
from ofxclient.account import Account<EOL>client = self.client()<EOL>query = client.account_list_query()<EOL>resp = client.post(query)<EOL>resp_handle = StringIO(resp)<EOL>if IS_PYTHON_2:<EOL><INDENT>parsed = OfxParser.parse(resp_handle)<EOL><DEDENT>else:<EOL><INDENT>parsed = OfxParser.parse(BytesIO(resp_handle.read().encode()))<EOL><DEDENT>return [Account.from_ofxparse(a, institution=self)<EOL>for a in parsed.accounts]<EOL>
Ask the bank for the known :py:class:`ofxclient.Account` list.

        :rtype: list of :py:class:`ofxclient.Account` objects