推荐学习书目
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
ch4ron
V2EX  ›  Python

关于 Python 的问题..

  •  
  •   ch4ron · Jul 26, 2019 via Android · 1631 views
    This topic created in 2552 days ago, the information mentioned may be changed or developed.
    3 replies    2019-07-29 23:57:57 +08:00
    ch4ron
        1
    ch4ron  
    OP
       Jul 26, 2019 via Android
    就是 fileinput 的一个模块,当我:
    for line in fileinput.input('')
    line = line.replce()
    print(line,end='')
    的时候 line replace 进去的字符会乱码,有没有什么好的解决方法
    arrow8899
        2
    arrow8899  
       Jul 26, 2019
    for line in fileinput.input(openhook=fileinput.hook_encoded('your_encoding'))
    ch4ron
        3
    ch4ron  
    OP
       Jul 29, 2019 via Android
    @arrow8899 加了以后没效果..连内容都没替换
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5741 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 52ms · UTC 03:15 · PVG 11:15 · LAX 20:15 · JFK 23:15
    ♥ Do have faith in what you're doing.