Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
If ^D splits the screen you have either re-configured your control keys or itself. On a standard installation, split screen is Cmd-D. – patrix Aug 27 '12 at 19:24

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.

share|improve this answer
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 Aug 27 '12 at 18:22

You can type exit() to exit Python.

share|improve this answer
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. Dec 12 '13 at 19:07

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.

share|improve this answer
How does this differ from the other answers? – Mark Dec 12 '13 at 14:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.