examples/inbox.py
async def get_information():
    """Example of printing the inbox."""
    jar = aiohttp.CookieJar(unsafe=True)
    websession = aiohttp.ClientSession(cookie_jar=jar)

    modem = eternalegypt.Modem(hostname=sys.argv[1], websession=websession)
    await modem.login(password=sys.argv[2])

    result = await modem.information()
    for sms in result.sms:
        pprint.pprint(sms)

    await modem.logout()
    await websession.close()
async def get_information():
    jar = aiohttp.CookieJar(unsafe=True)
    websession = aiohttp.ClientSession(cookie_jar=jar)

    modem = eternalegypt.Modem(hostname=sys.argv[1], websession=websession)
    await modem.login(password=sys.argv[2])

    result = await modem.information()
    for sms in result.sms:
        pprint.pprint(sms)

    await modem.logout()
    await websession.close()
async def get_information ( ) : jar = aiohttp . CookieJar ( unsafe = True ) websession = aiohttp . ClientSession ( cookie_jar = jar ) modem = eternalegypt . Modem ( hostname = sys . argv [ 1 ] , websession = websession ) await modem . login ( password = sys . argv [ 2 ] ) result = await modem . information ( ) for sms in result . sms : pprint . pprint ( sms ) await modem . logout ( ) await websession . close ( )
Example of printing the inbox.
Example of printing the inbox .