Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python full-screen graphics [closed]

Tags:

python

I would like to create a Python program on Linux supporting simple graphics such as those provided by John Zelle's graphics.py package. However, I need the graphics to be displayed full-screen, i.e., without the window title bar etc. The graphics.py package doesn't seem to support this. What is the easiest way to plot simple graphics on a full screen in Python?

like image 254
Zvika Avatar asked Jun 12 '26 01:06

Zvika


1 Answers

The standard way to make python GUI and graphics is with the tkinter package, this tutorial should get you started. As for full screen graphics, add the fullscreen attribute to your tk object:

Tk.attributes("-fullscreen", True)

Check out this question for alternate answers.

If you want to stick with graphics.py, I would give the window the same height and width as your resolution, on windows:

from win32api import GetSystemMetrics

width = GetSystemMetrics(0)
height = GetSystemMetrics(1)

win = GraphWin('Face', width, height)

Based on this, not so sure on the linux way.

Also check out PyGTK for another way to make a GUI.

like image 148
byrass Avatar answered Jun 13 '26 15:06

byrass



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!