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

看到python的客户端里面有一段话 不太明白作用是什么

  •  
  •   z00222334 · Mar 17, 2013 · 4162 views
    This topic created in 4942 days ago, the information mentioned may be changed or developed.
    while 1:
    buf=s.recv(2048)
    if not len(buf):
    break
    sys.stdout.write(buf)
    不太明白作用是什么
    4 replies  •  1970-01-01 08:00:00 +08:00
    htedsv
        2
    htedsv  
       Mar 18, 2013 via iPad   ❤️ 1
    反复从s接收最大长度序列放到缓存中,然后输出,直到接受完毕
    htedsv
        3
    htedsv  
       Mar 18, 2013 via iPad
    补充一下,s是字节流,不能直接输出
    z00222334
        4
    z00222334  
    OP
       Mar 18, 2013
    入门小白= =,稍微理解点了多谢楼上回复~
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1176 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 23:58 · PVG 07:58 · LAX 16:58 · JFK 19:58
    ♥ Do have faith in what you're doing.