V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
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
sll822
V2EX  ›  Python

我在ubuntu下运行这个程序没有问题 环境是python3 在win7下安装python3.2.2,环境变量设置了,但是会出现错误运行不了,直接点击会一闪而过。。

  •  
  •   sll822 · 2012-05-02 16:45:14 +08:00 · 2785 次点击
    这是一个创建于 4349 天前的主题,其中的信息可能已经有所发展或是发生改变。
    代码: http://hi.baidu.com/x1x1a919/blog/item/992b035026a6152e0df3e3e0.html

    C:\Users\sll>python
    Python 3.2.2 (default, Sep 4 2011, 09:07:29) [
    32
    Type "help", "copyright", "credits" or "license
    >>> cd C:\Users\sll\ip.py
    File "<stdin>", line 1
    cd C:\Users\sll\ip.py
    ^
    SyntaxError: invalid syntax
    >>> python ip.py
    File "<stdin>", line 1
    python ip.py
    ^
    SyntaxError: invalid syntax
    2 条回复    1970-01-01 08:00:00 +08:00
    sll822
        1
    sll822  
    OP
       2012-05-02 16:54:46 +08:00
    input()我加了个这个好了
    aggron
        2
    aggron  
       2012-05-02 17:24:54 +08:00
    输入了C:\Users\sll>python 这就进python解释器了,在里面打CD命令肯定报错啊,不需要这步。
    cd C:\Users\sll
    python ip.py
    PS:win下可以直接双击的吧
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3389 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 10:40 · PVG 18:40 · LAX 03:40 · JFK 06:40
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.