[MacPorts] #48864: Python and Shell Buffer

MacPorts noreply at macports.org
Mon Sep 14 21:41:25 PDT 2015


#48864: Python and Shell Buffer
--------------------+--------------------------------
 Reporter:  code@…  |      Owner:  macports-tickets@…
     Type:  defect  |     Status:  new
 Priority:  Normal  |  Milestone:
Component:  ports   |    Version:  2.3.3
 Keywords:  python  |       Port:
--------------------+--------------------------------
 Hi,
 When using versions of Python built by Macports 2.3.3 running Mac OX
 10.10, I'm seeing some really funny behavior. I've fully re-installed
 Macports, and replicated this on an iMac as well as a Macbook Air, and
 created a new user to make sure it wasn't something about my environment.
 This wasn't happening last week, and sometime in the interim something
 changed pretty drastically.

 Everything works fine until I invoke 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>>>
 }}}

 The `>>>` is being printed before the result of the input, but also after
 I tell Python to exit with Control-D.

 At this point, all input ceases to be printed in the terminal (the same
 happens in iTerm2). If I type `echo 'this is ouput; input is hidden'` the
 only thing I see is:

 {{{
 $ 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 being printed (not the norm), and control-D is simply being
 ignored - I have to type exit to get out of the prompt.

 Resetting the terminal with `reset` makes all of the problems go away, but
 interacting with the Python interpreter is still a nightmare.

 I can replicate this behavior in Python 2.7, 3.3, 3.4, and 3.5, which
 leads me to believe I'm looking for the problem in the wrong place.

 The packaged installs of Python (from the Python website) 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 stumped. I'm not at all sure where to ask for help for this issue. How
 do I go about figuring out what the problem is?

-- 
Ticket URL: <https://trac.macports.org/ticket/48864>
MacPorts <https://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list