changeset 406:cc5c68e15a83

merged
author Catherine Devlin <catherine.devlin@gmail.com>
date Sun, 07 Nov 2010 09:20:33 -0500
parents 3bef4253cf1b (diff) be18c88a0fc8 (current diff)
children f5aa16a22b52
files cmd2.py pyparsing_py3.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/cmd2.py	Sun Nov 07 06:48:15 2010 -0500
+++ b/cmd2.py	Sun Nov 07 09:20:33 2010 -0500
@@ -424,7 +424,7 @@
             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'},