comparison cmd2.py @ 21:24fbec27d66f

os.system returns 0 on success, silly
author catherine@localhost
date Fri, 16 May 2008 15:00:33 -0400
parents 0eb8d4e18472
children 354a6b713d36
comparison
equal deleted inserted replaced
19:1899088dd95d 21:24fbec27d66f
68 if not editor: 68 if not editor:
69 if sys.platform[:3] == 'win': 69 if sys.platform[:3] == 'win':
70 editor = 'notepad' 70 editor = 'notepad'
71 else: 71 else:
72 for editor in ['gedit', 'kate', 'vim', 'emacs', 'nano', 'pico']: 72 for editor in ['gedit', 'kate', 'vim', 'emacs', 'nano', 'pico']:
73 if not os.system('which %s' % (editor)): 73 if os.system('which %s' % (editor)):
74 break 74 break
75 75
76 settable = ['prompt', 'continuationPrompt', 'defaultFileName', 'editor', 'caseInsensitive'] 76 settable = ['prompt', 'continuationPrompt', 'defaultFileName', 'editor', 'caseInsensitive']
77 terminators = ';\n' 77 terminators = ';\n'
78 def do_cmdenvironment(self, args): 78 def do_cmdenvironment(self, args):