0

when using the curses.newwin() command e.g.

curses.newwin(10, 10, 0, 0) 

if i try to edit the integers to create a larger window the program terminates when I try to run it.

Dannyboy8899
  • 101
  • 2
  • 7
  • The terminal must have enough size for the window. You can't do `newwin(500, 500, 0, 0)` and expect it to work if the terminal is `80x20`. – Bakuriu Jun 15 '13 at 10:47
  • Along the lines of Bakuriu's comment: can you be more specific about the integer values you intend to use? – Schorsch Jun 15 '13 at 11:36

1 Answers1

0

As the comments have mentioned, you can't make a larger window than your parent terminal. If you're looking for a way to resize the terminal itself, consider something like this:

os.system("mode con cols=80 lines=60")  

os.environ['COLS'] = "80"
os.environ['LINES'] = "60"

This will change the console size. You can change the size to whatever you like, just change cols and lines as needed. The first line sets the upper limit on the bottom two--you'll throw an error if one of the lower numbers is larger.

Johan
  • 171
  • 1
  • 5