# HG changeset patch # User Catherine Devlin # Date 1289044567 14400 # Node ID 3bef4253cf1b8a9ec4e244450bbe6d58c131a882 # Parent e60e2c15f026a0bc9d55be8875db700756191bda swallow echo of editor path diff -r e60e2c15f026 -r 3bef4253cf1b cmd2.py --- a/cmd2.py Thu Sep 16 07:38:26 2010 -0400 +++ b/cmd2.py Sat Nov 06 07:56:07 2010 -0400 @@ -423,7 +423,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'},