summaryrefslogtreecommitdiff
path: root/cmd2.py
diff options
context:
space:
mode:
authorCatherine Devlin <catherine.devlin@gmail.com>2010-11-06 07:56:07 -0400
committerCatherine Devlin <catherine.devlin@gmail.com>2010-11-06 07:56:07 -0400
commit745b6f0e3cc3b7952773b64b53b1de6b5ca55aac (patch)
treec90679f5e7032b8c2e8d62e4da9f89d2175de546 /cmd2.py
parentf2c2169773dfbde66e40b7b351e42795981d0e27 (diff)
downloadcmd2-git-745b6f0e3cc3b7952773b64b53b1de6b5ca55aac.tar.gz
swallow echo of editor path
Diffstat (limited to 'cmd2.py')
-rwxr-xr-xcmd2.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd2.py b/cmd2.py
index 8e22e4ce..fd3efb4f 100755
--- a/cmd2.py
+++ b/cmd2.py
@@ -423,7 +423,7 @@ class Cmd(cmd.Cmd):
editor = 'notepad'
else:
for editor in ['gedit', 'kate', 'vim', 'emacs', 'nano', 'pico']:
- if not os.system('which %s' % (editor)):
+ if not subprocess.Popen(['which', editor], stdout=subprocess.PIPE).communicate()[0]:
break
colorcodes = {'bold':{True:'\x1b[1m',False:'\x1b[22m'},