# Platform support for Unix
else:
- import commands
+ try:
+ from commands import getoutput
+ except ImportError:
+ from subprocess import getoutput
# @WARNING: use the private API of the webbrowser module
from webbrowser import _iscommand
def detect_kde_version(self):
kde_version = None
try:
- info = commands.getoutput('kde-config --version')
+ info = getoutput('kde-config --version')
for line in info.splitlines():
if line.startswith('KDE'):
desktop_environment = 'gnome'
else:
try:
- info = commands.getoutput('xprop -root _DT_SAVE_MODE')
+ info = getoutput('xprop -root _DT_SAVE_MODE')
if ' = "xfce4"' in info:
desktop_environment = 'xfce'
except (OSError, RuntimeError):