leodh
Posts: 8
Joined: Fri Apr 18, 2014 10:23 am

How do I change terminal size

Sun Jun 08, 2014 11:18 pm

Hi,
I am trying to change the size of the output window(terminal) with curses. I would like a window 75 x 18 chrs.
I am using Wheezy and Python, and all the examples that I try do not seem to do anything.
Do I need something else besides Curses imported to get it to work.

If someone could show me working example, that would be great.
Thanks
Leo

User avatar
AndyD
Posts: 2334
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia
Contact: Website

Re: How do I change terminal size

Mon Jun 09, 2014 1:10 pm

I think the short answer is you can't use curses to change the terminal size. If really want to do it ... you could print a XTerm control sequence like this:-

Code: Select all

print chr(27) + "[8;18;75t"

Return to “Beginners”