Python Forum

Full Version: Change Text Size in Console?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, everyone!

On Windows 10, I am creating a Python script, but the text output in the console is too tiny. I am aware that I can right-click on it, go to Properties, then Font, then change the size and colour, etc, but I'm going to be distributing this script, and so I want it to be done automatically.

Is there a way to change the console text size using Python?

If there is not, is there any way to set the font size to something, then have it be the same for any other computer (on Windows)?
why would you want to mess with other people's settings of their terminal?
(Jun-02-2020, 08:07 PM)buran Wrote: [ -> ]why would you want to mess with other people's settings of their terminal?

I am changing the font size so my output is readable.
If user is not happy with the font or font size of their terminal output - they will change it. i.e. that is not a GUI made by you. In terminal it will print using the user's settings, e.g. my terminal font and font size are perfectly fine for me. If it was your GUI - then it's fine to set font/size, etc. but please don't mess with my/user's system settings
(Jun-02-2020, 08:51 PM)buran Wrote: [ -> ]If user is not happy with the font or font size of their terminal output - they will change it. i.e. that is not a GUI made by you. In terminal it will print using the user's settings, e.g. my terminal font and font size are perfectly fine for me. If it was your GUI - then it's fine to set font/size, etc. but please don't mess with my/user's system settings

Most users I will be distributing to will not be tech-savvy, and may have never opened a terminal in their life.
They will open the distribution, see the size of the text, and won't use it. I doubt most people will know how to change the font size, and I doubt more that they would learn how to. Most would just think that's what it looks like.

I may add that my distribution is an executable? It doesn't mess with the computer's settings, only it's own.

It is not a GUI made by me, but I add elements such as colours, bold and underlined letters, ASCII art, etc. An inappropriate text size would, more or less, ruin the experience.

So, please, may you answer the question I had originally?

Thank you.
(Jun-03-2020, 07:38 AM)ShakeyPakey Wrote: [ -> ]So, please, may you answer the question I had originally?
Nope, I don't like when developers think they know better than the users.

In addition - you assume certain terminal/shell program, while it may defer if user has/use something different - e.g. cmd vs cmder vs powershell, etc. If you want to enforce/ensure certain look and feel - make a GUI/web app
(Jun-03-2020, 07:49 AM)buran Wrote: [ -> ]
(Jun-03-2020, 07:38 AM)ShakeyPakey Wrote: [ -> ]So, please, may you answer the question I had originally?
Nope, I don't like when developers think they know better than the users

I am trying to make what my user experiences better and high-quality.

This is what you are saying: for example, I could be making a videogame with missions, but I don't develop one mission. I say "That's fine, the players can make mods to create that mission."
  • The vast majority of players are expected not to know coding, much less videogame modding.
  • I, the developer, has not mentioned anything about this. Players don't even know the mission exists.
  • Players who know about the mission are familiar with coding and have spent time to look through the game code, which is VERY rare.

Imagine if that was, instead, the graphics of the videogame. Graphics are automatically set to the lowest setting, and the only way to change them is in the code of the game.

Would you accept that as a product?

It's the same for my issue, even more so because text readability is the most important factor in user experience.

I am no longer asking for your answer, but @buran, in the future, please do not ask a series of exhausting questions, not helping the poster in any way, only to then refuse answering because you do not like the poster due to some petty reason. You might let down a new programmer.

Thank you.
Quote:I am trying to make what my user experiences better and high-quality.

You're wrong. You don't know my preferences nor the user preferences.
The settings of the terminal are user defined.

If you program for people who never used a console, you should better program a GUI or a Web application.
The terminal is for experienced users.

PS: I guess there is a way to modify users terminal settings. Maybe with ctypes or win32. Since Windows 10 we've more than one terminal.
(Jun-03-2020, 08:18 AM)ShakeyPakey Wrote: [ -> ]I am no longer asking for your answer, but @buran, in the future, please do not ask a series of exhausting questions, not helping the poster in any way, only to then refuse answering because you do not like the poster due to some petty reason. You might let down a new programmer.

In fact I am trying to prevent an obviously new programmer from making mistake by assuming they know better what user wants. As I said - if you want to control feel and look - make a GUI/web app. That's exactly what your example about the graphics of a video game is. Using a CLI/terminal - you accept what your user preferences are, although some small modifications like color are acceptable (e.g. using ANSI control sequences).
In your original post you say the output in console is too tiny. That is subjective - I (and probably huge part of the population) find the default settings just fine. However you come and assume it's too tiny for all, just because you "think/feel" so. Finally, you ask how to change the settings of external program - the terminal/shell app used by the user, assuming incorrectly there is only one possible app they can use (cmd, right?). Note these are not settings in your program, but settings in another one. However there are many terminal/shell alternatives and you cannot account for all of them.
So, again and I stop here - make a GUI/web app if you want certain feel/look, don't mess with user preferences.
Um, can you tell me how I need it for ANSI art So I can dynamically change the text size for images and return it to the users preferences for text so I can have images and text the correct size so the text is big/small (user preference) and the Image characters small so it fits correctly?