12 lines
362 B
Python
12 lines
362 B
Python
|
#!/usr/bin/env python3
|
||
|
from subprocess import call, check_output
|
||
|
from os.path import basename
|
||
|
|
||
|
def parse_list_item(item):
|
||
|
item = item.strip().split(" ", 2)
|
||
|
item[1] = item[1][1:-1]
|
||
|
return tuple(item)
|
||
|
|
||
|
def get_sms():
|
||
|
return [parse_list_item(sms) for sms in check_output(["mmcli", "-m", "any", "--messaging-list-sms"]).decode().strip().split("\n")]
|