return "Usage: pager('filename')"
def __call__(self, filename):
- pager = os.environ["PAGER"] or 'more'
+ pager = os.environ.get("PAGER") or 'more'
os.system("%s '%s'" % (pager, filename.replace("'", '"\'"')))
__builtin__.pager = _Pager()
return "Usage: edit('filename')"
def __call__(self, filename):
- editor = os.environ["VISUAL"] or os.environ["EDITOR"] or 'vi'
+ editor = os.environ.get("VISUAL") or os.environ.get("EDITOR") or 'vi'
os.system("%s '%s'" % (editor, filename.replace("'", '"\'"')))
__builtin__.edit = __builtin__.editor = _Editor()