Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6655095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:28:18+00:00 2026-05-26T01:28:18+00:00

I am writing a Python script to print out displayable user interface. The problem

  • 0

I am writing a Python script to print out displayable user interface. The problem is every Linux user would have their own unique terminal size. This will cause the hard-coded user interface to go out of format.

(If there is a lot of example below, the terminal looks Crazy!!!).

Example, in the script. I have print out:

print "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"

Format should goes well in my terminal:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

When the terminal is smaller, the print out format will run out.
Format become:
++++++++++++++++++++++++++++++++++++++++++++

+++++++++++++++++++++++++++++

So I am thinking:

  1. When the user run the script, can I auto change the Linux terminal size to my declare size
  2. Can I get the Width and Length of the user terminal size using Python, so the terminal display can be flexible
  3. I would like to hear any better solution around the world to solve the terminal display problem!

I would strongly prefer recommendation in Python

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T01:28:19+00:00Added an answer on May 26, 2026 at 1:28 am

    I’d highly suggest using something like the Python Standard Library’s curses module to do this.

    Don’t reinvent the wheel – using an existing library will both help you avoid corner cases and also save you time. Plus, the curses interface is a familiar one to *nix users, which will make them like you more.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a python script that is constantly grabbing data from Twitter and writing
I have two python scripts. First one is just a script waiting for user
I am writing a python script (Linux) that is adding some shell aliases (writes
I'm writing a python script that executes a csh script in Solaris 10. The
I'm writing a script in python which basically queries WMI and updates the information
I ended up writing a quick little script for this in Python, but I
Hey guys/gals I'm writing a python script that fixes some duplicate issues on my
I'm writing a simple dual timer in Python. (I'm running Linux, and this should
I'm writing a python script to loop through a directory of CSS files and
I've been writing python scripts that run locally. I would now like to offer

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.