B
B
Bebronyukh Savory2021-06-24 20:57:52
Python
Bebronyukh Savory, 2021-06-24 20:57:52

How to change font size, window and text color in python?

I want to make a small console game in python.

It would be desirable to make a minimal graphical interface so that there would be a normal window, and not a bare console, the ability to change the font size and color.

Advise some library or tell me what to do.

Thanks in advance :)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
lil.fxrrx, 2021-06-25
@mxrdxfxrrx

pygame ( https://www.pygame.org/docs/ ) pyglet ( https://pyglet.readthedocs.io/en/latest/ ) pyqt5 (game interface) ( https://www.riverbankcomputing.com/static/ Docs/PyQt5/ ) wxpython (game interface) ( https://wiki.wxpython.org ) There are a lot of tutorials on YouTube.

Q
Quteray, 2021-06-25
@Qutray

To change the color you can use colorama or termcolor
You can also use terminal colors
print('\033[91m .......')
print(color text)
link to colors : https://gist.github.com/minism/ 1590432
Regarding the font in the console, it may help, in the article they try through ctypes
https://fooobar.com/questions/16438312/python-prog...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question