import subprocess import logging from alot.settings.const import settings def getmail(ui=None): ui.notify("fetching email..") msg=subprocess.Popen("offlineimap".split(),stdout=subprocess.PIPE,stderr=subprocess.PIPE) # ui.notify(msg) def pre_start(): logging.info("run offlineimap") subprocess.run(["offlineimap"]) pre_start()