V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  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
flyingkid
V2EX  ›  Python

python学习 遇到一个问题

  •  
  •   flyingkid ·
    kennx · Oct 21, 2011 · 5711 views
    This topic created in 5311 days ago, the information mentioned may be changed or developed.



    在win下用IDLE python GUI,不能运行。老是缩进错误,不知道怎么缩进= =

    然后我用aptana把缩进格式改了能运行,但是一直输出loop #0 不停的循环。
    5 replies    1970-01-01 08:00:00 +08:00
    ollama
        1
    ollama  
       Oct 21, 2011
    我在win下用IDLE运行表示正常。
    关于你的死循环问题,可能是counter += 1前的缩进格式有问题。以至于不在while循环体内。
    flyingkid
        2
    flyingkid  
    OP
       Oct 21, 2011
    @lanisle 3Q。我知道了。我真是粗心。v2ex真好。
    lyydev
        3
    lyydev  
       Oct 21, 2011
    开发Python程序要注意缩进,很多问题都是出现在代码的缩进上,特别是经常使用不同的编辑器
    renyuan1985
        4
    renyuan1985  
       Oct 22, 2011
    Python确实需要注意缩进,我一般的做法就是用VIM,家里Mac和公司win基本一样!
    alsotang
        5
    alsotang  
       Oct 25, 2011
    @renyuan1985 我觉得编码没有vim给我用的话,我还不如干点别的,等回到有vim的环境再编...
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3247 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 14:07 · PVG 22:07 · LAX 07:07 · JFK 10:07
    ♥ Do have faith in what you're doing.