我正在尝试学习 python,但偶然发现了我的另一个愚蠢错误。
对于我从python.org下载的 2.7.3 版本,我没有得到任何带有-c
. 我确实从 cygwin 获得了 2.6.8 版本的输出。
我错过了什么?
> c:\Python27\python.exe --version
Python 2.7.3
> c:\Python27\python.exe -c 'print("hello")'
> c:\Python27\python.exe
Python 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> print("hello")
hello
>>> exit()
> c:\cygwin\bin\python2.6.exe --version
Python 2.6.8
> c:\cygwin\bin\python2.6.exe -c 'print("hello")'
hello
> c:\cygwin\bin\python2.6.exe
Python 2.6.8 (unknown, Jun 9 2012, 11:30:32)
[GCC 4.5.3] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()