Sublime Forum

CTRL-C :: Terminating Python Applications

#1

I am loving Sublime Text 2, running it on Mac OS X 10.7.2.

I was playing around with the Bottle web framework, http://bottlepy.org/docs/dev/. When I launch the server from within the editor (CMD-B), the “output” window opens under the code and says:

Bottle server starting up (using PasteServer())…
Listening on http://0.0.0.0:8888/
Hit Ctrl-C to quit.

But hitting Ctrl-C does not terminate the server like it would if I launched it from a terminal window. Is there a way to kill off a Python instance like that from within Sublime Text 2?

0 Likes

#2

Try Ctrl+break (right next to scroll lock)

0 Likes

#3

There is no “break” key so I googled around and bit and some said that Ctrl-Break was ‘Typically, ⌘ .’ Some said the Return key was in the combination. I tried them both and several other guesses. Nothing has worked so far. I am using an iMac with one of those small key-boards.

0 Likes

#4

The Tools/Cancel Build menu item does this

1 Like

#5

You have to stop the python process that you started by running the build in Sublime Text. You might be able to skip step one, but what I did was.

  1. Cancel the build in Sublime Text.
  2. Kill the python.exe process.
0 Likes

#6

I found a solution, open Key Bindings and add like:

    [
    	{ "keys": ["super+ctrl+c"], "command": "cancel_build" },
    ]

But If start the server, the server can’t be stopped because the cancel is still grey.

0 Likes