4 条回复 • 2020-05-18 23:50:22 +08:00
|
1
renmu 2020 年 5 月 18 日 via Android
不能做文件名的符号用个函数都过滤掉就好了
|
|
2
customsshen 2020 年 5 月 18 日
随便整一个相对路径文件名不行吗?
|
|
3
ClericPy 2020 年 5 月 18 日
我直接无脑 re.sub(r'[^ \w]+', '_', name).strip() 替换了... 懒得去对比不同操作系统的安全文件名符号列表
|
|
4
Trim21 2020 年 5 月 18 日 via Android
那就用 replace 把星号删掉啊
|
推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide