Hello,
Today I learned about curses--and found this tutorial.
To make sure I was doing things right, I made a simple Hello World! script:
PHP Code:
import curses as c
stdscr = c.initscr()
c.noecho()
c.cbreak()
stdscr.keypad(1)
stdscr.addstr("Hello World!\n")
stdscr.refresh()
c.nocbreak(); stdscr.keypad(0); c.echo() #To return terminal back to normal
Which outputs:
Code:
Hello World!
timmy@Stanway01:~$
And then I can use my terminal like normal--except I can't see anything I type in. For example:
Code:
Hello World!
timmy@Stanway01:~$ Python 2.5.2 (r252:60911, Oct 5 2008, 19:24:49)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> timmy@Stanway01:~$
I typed in python, and then exit(). And yes, it did that spacing.
How do I solve this? Thank you.