And*_*ham 7 python macos macports
抱歉,如果发布这个是错误的地方 - 我不清楚问题是什么.
当使用运行Mac OX 10.10的Macports 2.3.3构建的Python版本时,我看到了一些非常有趣的行为.我已经完全重新安装了Macports,并在iMac和Macbook Air上复制了这个,并创建了一个新用户,以确保它不是我的环境.这种情况上周没有发生,有时在过渡时期发生了一些变化.
一切正常,直到我调用Python.
$ python
Python 3.4.3 (default, Aug 26 2015, 18:29:14)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 1+1
>>> 2
^D>>>
Run Code Online (Sandbox Code Playgroud)
的>>>输入的结果之前正在打印,而且还经过我告诉Python与控制-d退出.
此时,所有输入都不再在终端中打印(iTerm2中也是如此).如果我输入我echo 'this is ouput; input is hidden'唯一看到的是:
$ this is ouput; input is hidden
Run Code Online (Sandbox Code Playgroud)
如果我重新调用解释器,事情会更加怪异.
$ Python 3.4.3 (default, Aug 26 2015, 18:29:14)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 1+1
>>> 2
^C
KeyboardInterrupt
>>> ^D
>>> exit()
>>> $
Run Code Online (Sandbox Code Playgroud)
正在打印Control-C(而不是标准),并且只是忽略了control-D - 我必须输入exit才能退出提示.
重置终端reset会使所有问题都消失,但与Python解释器的交互仍然是一场噩梦.
我可以在Python 2.7,3.3,3.4和3.5中复制这种行为,这让我相信我在错误的地方寻找问题.
Python的打包安装(来自Python网站)工作正常,并且不会出现这种行为.
$ python3
Python 3.5.0 (v3.5.0:374f501f4567, Sep 12 2015, 11:00:19)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 1+1
2
>>>
KeyboardInterrupt
>>> ^D
Run Code Online (Sandbox Code Playgroud)
我很难过.我不确定在哪里可以为这个问题寻求帮助.我该如何找出问题所在?
我在Macport Trac上打开了一个错误报告,然后才意识到这个问题可能会更好.
| 归档时间: |
|
| 查看次数: |
501 次 |
| 最近记录: |