3

When using python in cygwin, you need to use "python -i" to get into interactive mode. This mode however removes my ability to use my arrow keys to go through my history.

When I push the Up-Key, the cursor goes up. When I press DELETE, the character gets deleted. I want my cursor to act like a normal Windows CLI; where it stays on ONE line.

Vjeetje
  • 5,314
  • 5
  • 35
  • 57
  • when i am in cygwin i usually just type `python` to get into the shell(although this may beg the question of why are you using cygwin? instead of python for windows?) – Joran Beasley Sep 18 '13 at 21:06
  • If I use python without the -i option, I don't get anything and the output gets buffered and is never shown until you close it with ctrl-C. I'm using a python version in cygwin that was installed as a normal python exe. I'm using python inside cygwin because I need to refer to a dll build using cygwin, which can't be used inside windows alone. – Vjeetje Sep 18 '13 at 21:09
  • 2
    Are you using the cygwin version of Python, or a native Windows install of Python? – abarnert Sep 18 '13 at 21:10
  • native windows install – Vjeetje Sep 18 '13 at 21:11
  • That's usually a bad idea. Cygwin Python builds are built to work inside the cygwin environment; native ones inside the normal cmd.exe environment. And if the reason you're using cygwin is to access a cygwin DLL… it's an even _more_ bad idea; whatever you're using the access the DLL (`ctypes` or `cffi`, or building a bindings extension module around it, or whatever) is going to segfault all over the place. – abarnert Sep 18 '13 at 21:13
  • 1
    (Meanwhile, running a program from cmd.exe doesn't stop that program from accessing cygwin DLLs, and running from a cygwin shell doesn't help it do so. So if your code works—which it probably won't—it will work just as well if you start Python from the Windows CLI.) – abarnert Sep 18 '13 at 21:14
  • well If I access the dll build with cygwin inside windows env, I get the following error:"The program can't start because cygwin1.dll is missing…". And the dll i'm accessing isn't a dll of cygwin, it' a dll build using cygwin (make). – Vjeetje Sep 18 '13 at 21:17
  • hmm, adding \cygwin\bin to system path fixed it. Thanks – Vjeetje Sep 18 '13 at 21:23
  • if that's an option for you, running Cygwin.bat instead of mintty.exe solved this for me – Bananach May 01 '19 at 12:42

0 Answers0