开发者

Python: get list of characters inapplicable for file naming?

开发者 https://www.devze.com 2023-04-11 05:45 出处:网络
In a Python script I want to know which characters 开发者_运维问答are inapplicable for use in file names under current OS/FileSystem. I\'d like to create files without errors. Is there such feature in

In a Python script I want to know which characters 开发者_运维问答are inapplicable for use in file names under current OS/FileSystem. I'd like to create files without errors. Is there such feature in Python?


I hate to answer a question with another question, but this question seems to be what you are looking for: turn a string into a valid filename in Python. Otherwise, the list of reserved characters by OS is here.

0

精彩评论

暂无评论...
验证码 换一张
取 消