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 · 10255 views
You need to sign in to view this topic
This topic created in 4744 days ago, the information mentioned may be changed or developed.
就是清除当前行 在当前行上继续输出而不是清屏
输出
行上
Python
6 replies
•
1970-01-01 08:00:00 +08:00
dndx
Dec 8, 2013
1
http://docs.python.org/2/howto/curses.html
TankyWoo
Dec 8, 2013
2
http://www.zhihu.com/question/21100416
VYSE
Dec 8, 2013
3
sys.stdout.write不回车就是刷新当前行
caizixian
OP
Dec 10, 2013 via Android
4
@
VYSE
不是太懂 能不能说详细些
VYSE
Dec 11, 2013
5
@
caizixian
from time import sleep
import sys
for i in range(1000):
sys.stdout.write(str(i)+'\r')
sleep(0.1)
VYSE
Dec 11, 2013
6
@
caizixian
好吧说错了,\r是回车,只要别\n就不会到新一行了,\r回车就是回到行首的意思
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Privacy
·
Solana
·
924 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 29ms ·
UTC 20:38
·
PVG 04:38
·
LAX 12:38
·
JFK 15:38
♥ Do have faith in what you're doing.
❯