3

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?

Zvika
  • 1,236
  • 12
  • 16
  • 1
    Primaly opinion-based. And what about tkinter, pygame, qt, etc.? Just use Google to find much graphic packages. – palsch Dec 13 '15 at 13:47
  • FWIW, the window manager should let you display any window in full-screen mode. Eg, in KDE in the window's title bar's Advanced menu there's a Fullscreen option. You can activate that option with the Alt F3-v-f key sequence; you need to use that key sequence to return from Fullscreen mode. – PM 2Ring Dec 13 '15 at 13:53

1 Answers1

2

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.

Community
  • 1
  • 1
byrass
  • 360
  • 2
  • 12
  • Thanks for the quick reply! Was hoping for a solution that would use graphics.py, but playing around with the underlying Tkinter indeed seems more complicated than just using Tkinter's canvas directly. – Zvika Dec 13 '15 at 14:06
  • No problem, just trying to help :) – byrass Dec 13 '15 at 14:08