newline.py

来自「ace开发环境 用来开发网络程序 其运用了设计模式、多平台、C++等多种知识」· Python 代码 · 共 18 行

PY
18
字号
""" Checks that the file has a newline at the end. """type_list = ["cpp", "h", "inl", "html", "idl", "pl"]import refrom sys import stderrregex = re.compile ("\n\Z")def handler (file_name, file_content):    if regex.search (file_content) == None:        stderr.write (file_name + ":0: error: " + file_name + " lacks a newline at the end of the file.\n")        return 1    else:        return 0    

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?