diff options
author | benadha <benawiadha@gmail.com> | 2019-10-25 22:08:00 +0700 |
---|---|---|
committer | benadha <benawiadha@gmail.com> | 2019-10-25 22:08:00 +0700 |
commit | fe2cf0e993823928f6a82b7ac9428a3889374001 (patch) | |
tree | b9905cb78b08f0a8d8da66fc6d50d063609c0792 | |
parent | 0571b9119671d4946373d5138e584a2327032e4b (diff) | |
download | epy-fe2cf0e993823928f6a82b7ac9428a3889374001.tar.gz |
Suprress output from subprocess.
-rwxr-xr-x | epy.py | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -53,10 +53,11 @@ import textwrap import json import tempfile import shutil +import subprocess import xml.etree.ElementTree as ET from urllib.parse import unquote from html import unescape -from subprocess import run +# from subprocess import run from html.parser import HTMLParser from difflib import SequenceMatcher as SM @@ -628,7 +629,13 @@ def open_media(scr, epub, src): try: with os.fdopen(fd, "wb") as tmp: tmp.write(epub.file.read(src)) - run(VWR + " " + path, shell=True) + # run(VWR + " " + path, shell=True) + subprocess.call( + VWR + " " + path, + shell=True, + stdout=subprocess.DEVNULL, + stderr=subprocess.DEVNULL + ) k = scr.getch() finally: os.remove(path) |