Sorry if this is the wrong place to post this post - I don't understand what the problem is.
When using the Python versions created by Macports 2.3.3 under Mac OX 10.10, I see some really funny behavior. I completely reinstalled Macports and replicated this on the iMac, as well as on the Macbook Air, and created a new user to make sure it wasn’t something in my environment. This did not happen last week, and at some point something had changed a lot.
Everything works fine until I call 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>>>
>>> is printed before the input result, but also after I tell Python to exit with Control-D.
At this point, all input data is no longer printed on the terminal (the same thing happens in iTerm2). If I type echo 'this is ouput; input is hidden' echo 'this is ouput; input is hidden' , the only thing I see:
$ this is ouput; input is hidden
Things get even weirder if I re-invoke the interpreter.
$ 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() >>> $
Control-C is printed (not the norm), and control-D is simply ignored - I need to type exit to exit the prompt.
Resetting the terminal with reset fixes all problems, but interacting with the Python interpreter is still a nightmare.
I can reproduce this behavior in Python 2.7, 3.3, 3.4, and 3.5, which makes me think that I was looking for the problem in the wrong place.
Python batch installations (from the Python site) work fine and do not exhibit this behavior.
$ 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
I'm at a dead end. I am not at all sure where to turn to this problem for help. How do I understand what the problem is?
I opened a bug report on Macport Trac before realizing that this question might be useful here.