Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

open 需要指定 newline 参数 #13

Open
XIVN1987 opened this issue Dec 8, 2023 · 0 comments
Open

open 需要指定 newline 参数 #13

XIVN1987 opened this issue Dec 8, 2023 · 0 comments

Comments

@XIVN1987
Copy link

XIVN1987 commented Dec 8, 2023

两句 file_temp = open(temp_file, 'w', encoding='utf-8') 应该改成 file_temp = open(temp_file, 'w', encoding='utf-8', newline='\n')

否则在 windows 上执行时文件后缀依然保持 '\r\n' 不变

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant