⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 newline.py

📁 最新的版本ACE-5.6.8,刚从外文网上搬下,与大家分享.
💻 PY
字号:
""" Checks that the file has a newline at the end. """

type_list = ["cpp", "h", "inl", "html", "idl", "pl"]

import re
from sys import stderr

regex = 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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -