Home
Sign Up
Sign In
推荐学习书目
›
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
V2EX
›
Python
Python如何实现控制台样式的原地输出
caizixian
·
caizixian
·
Dec 8, 2013
via Android · 10209 views
This topic created in 4712 days ago, the information mentioned may be changed or developed.
就是清除当前行 在当前行上继续输出而不是清屏
输出
行上
Python
6 replies
•
1970-01-01 08:00:00 +08:00
1
dndx
Dec 8, 2013
http://docs.python.org/2/howto/curses.html
2
TankyWoo
Dec 8, 2013
http://www.zhihu.com/question/21100416
3
VYSE
Dec 8, 2013
sys.stdout.write不回车就是刷新当前行
4
caizixian
OP
Dec 10, 2013 via Android
@
VYSE
不是太懂 能不能说详细些
5
VYSE
Dec 11, 2013
@
caizixian
from time import sleep
import sys
for i in range(1000):
sys.stdout.write(str(i)+'\r')
sleep(0.1)
6
VYSE
Dec 11, 2013
@
caizixian
好吧说错了,\r是回车,只要别\n就不会到新一行了,\r回车就是回到行首的意思
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Privacy
·
Solana
·
5396 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 32ms ·
UTC 02:44
·
PVG 10:44
·
LAX 18:44
·
JFK 21:44
♥ Do have faith in what you're doing.
❯