Python curses Redirection is not supported

shaosh picture shaosh · May 24, 2013 · Viewed 15.1k times · Source

I am trying to use Curses in PyDev in Eclipse in Win7.

I have installed Python 3.2 (64bit) and curses-2.2.win-amd64-py3.2. When I input the following testing codes into PyDev:

import curses  

myscreen = curses.initscr()
myscreen.border(0)
myscreen.addstr(12, 25, "Python curses in action!")    
myscreen.refresh()
myscreen.getch()     
curses.endwin()

It did not show any syntax error, so I think the curses was installed correctly.

However, when I ran it as Python Run, the output showed: Redirection is not supported. I do not know where this problem comes from. I googled a lot but can't find related information.

Answer

codeape picture codeape · Oct 22, 2017

Recent PyCharm versions (I am currently running 2017.2, not sure when this option was added, or if it has been there the entire time) have the option "Emulate terminal in output console". Curses works with this option checked.

enter image description here