1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | try: with open(file_name, "r") as f: lines = f.readlines() except IOError: print("Error when opening the file") usage() else: title = "" language = "Text only" is_private = False paste_url = send_paste( lines, title, language, is_private ) print(paste_url) |