0

I just tried using curses w/ python 2.7.6 running OS 10.9.2 to just get the curses.beep() function to work. I got the beep but my terminal stopped showing me my input (I'm not talking the echo from interactive Python but actually what I was typing in at the moment - kind of like entering your password w/ sudo) Also when I hit return the new prompt would be on the same line. I've tried this w/ interactive Python and using a .py script.

importSucceed = True 
try:
   import curses
except ImportError:

   print "error"
   importSuc = False

if importSucceed == True:
   print "Trying to init screen"
   stdscr = curses.initscr()
   print "Trying to beep"
   curses.beep()

I got as output:

Trying to init screen


#30ish lines of space


Trying to beep
                   PROMPT> # the prompt started indented 2ish tabbed spaces

if I continued entering commands into my terminal I would just get

               PROMPT> PROMPT> PROMPT> PROMPT>

with nothing from my input showing up.

Any thoughts?

Ben Kushigian
  • 285
  • 1
  • 10
  • Don't you have to call the [functions to restore the terminal](http://docs.python.org/2/howto/curses.html#starting-and-ending-a-curses-application)? – kirbyfan64sos Mar 23 '14 at 02:11
  • Yup, that did it. Looks like I should have read on. Thanks and sorry about that. I spent 90 minutes looking for curses bugs and glitches - didn't even think to check to see if that was supposed to happen :) – Ben Kushigian Mar 23 '14 at 02:15

0 Answers0