summaryrefslogtreecommitdiff
path: root/alot/helper.py
diff options
context:
space:
mode:
authorpazz <patricktotzke@gmail.com>2011-06-14 15:40:41 +0100
committerpazz <patricktotzke@gmail.com>2011-06-18 13:25:46 +0100
commite48523bcbbf6fd431bc3a7343ea32b65af8a4f29 (patch)
tree74c319c175c31b6db3c40f40a1c70b2bf818a291 /alot/helper.py
parent316423a063f262d15a41c5a8d167f760eb411085 (diff)
use mailcap info for text/html dumps
Diffstat (limited to 'alot/helper.py')
-rw-r--r--alot/helper.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/alot/helper.py b/alot/helper.py
index 06fa986e..2fdf6d5f 100644
--- a/alot/helper.py
+++ b/alot/helper.py
@@ -19,6 +19,9 @@ Copyright (C) 2011 Patrick Totzke <patricktotzke@gmail.com>
from datetime import date
from datetime import timedelta
+import shlex
+import subprocess
+
def shorten(string, maxlen):
if len(string) > maxlen - 3:
@@ -38,3 +41,7 @@ def pretty_datetime(d):
else:
string = d.strftime('%b %d')
return string
+
+def cmd_output(command_line):
+ args = shlex.split(command_line)
+ return subprocess.check_output(args)