11

I'm having a couple problems with basic command line stuff in the terminal of Mountain Lion.

control + D does not exit Python as it does in Lion; instead it splits the screen.

Meanwhile, I also haven't figured out how to continue writing after having viewed the contents of a text document - the terminal doesn't allow it.

Hello hello hello!
ex12.txt (END)

So far, no matter what I push after this, I get a nasty little beeping sound

1
  • 1
    If ^D splits the screen you have either re-configured your control keys or Terminal.app itself. On a standard installation, split screen is Cmd-D.
    – nohillside
    Commented Aug 27, 2012 at 19:24

3 Answers 3

16

As Control + D works for me on multiple Macs, I'll presume something is amiss with your installation, keyboard or keyboard handler. (Your difficulty with the pager also lends credence to this theory.)

You can use the alternate quit() to exit the interpreter until you have looked at how Python was installed or think of some modifications you might have on the key mapping on your Mac.

1
  • I just tried using the Windows commands for the same tasks and they work well. It must therefore be the edition I downloaded, I'm assuming
    – Karl
    Commented Aug 27, 2012 at 18:22
7

You can type exit() to exit Python.

1
  • Typing exit() in the Python interpreter shell is the canonical way to exit the Python interpreter shell. It works for all Python interpreter shells across all Python versions >2.6 across all operating systems.
    – Ian C.
    Commented Dec 12, 2013 at 19:07
-2

I had the same problem and I came across this post.

I think we both thought that we did ^ Ctrl-D but we actually did ⌘ Cmd-D, which is different shortcut and splits the terminal window.

1
  • How does this differ from the other answers?
    – mmmmmm
    Commented Dec 12, 2013 at 14:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .