def edit(sheet): """ Opens a cheatsheet for editing """ try: subprocess.call([editor(), path(sheet)]) except OSError: die('Could not launch ' + editor())
def create(sheet): """ Creates a cheatsheet """ new_sheet_path = os.path.join(sheets.default_path(), sheet) try: subprocess.call([editor(), new_sheet_path]) except OSError: die('Could not launch ' + editor())