I'm used to ending the python interactive interpreter using Ctrl-d using Linux and OS X. On windows though, you have to use CTRL+Z and then enter. Is there any way to use CTRL+D?
ctrl+c stops any process currently running. Use quit() to exit the console. Try typing in 'exit()' instead.
You can't use CTRL+D on windows.
CTRL+Z is a windows-specific control char that prints EOF. On *nix, it is typically CTRL+D. That's the reason for the difference.
You can, however, train yourself to use exit()
, which is cross-platform.
Ctrl-d works to exit from IPython
(installed by python(x,y) package).
Edit: I've been informed in the comments by the OP, Jason Baker, that Ctrl-d functionality on Windows OSes is made possible by the PyReadline package: "The pyreadline package is a python implementation of GNU readline functionality it is based on the ctypes based UNC readline package by Gary Bishop. It is not complete. It has been tested for use with windows 2000 and windows xp."
Since you're accustomed to *nix you may like that IPython also offers *nix-like shell functionality without using something like Cygwin...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With