arqeco
Posts: 2
Joined: Mon May 25, 2015 11:58 am

Best options for FullScreen application

Mon May 25, 2015 12:17 pm

Hello,

My name is Márcio. I am from Brazil and this is my first post here.

Now I am looking for options for a graphical user interface for an industrial monitoring application I am developing on Python. The application will run automatically after boot and then take over full screen. Probably I will use a PyTFT touch display. I don´t need a complete graphical environment (LXDE or something), and the Pi will be completely dedicated to just this single application. Some people call this a kiosk mode app.

The graphical design of the screen will be simple (basically numbers, but maybe a graphic) but informations on screen must be updated when events happens on the controlled industrial equipment, sometimes every one second or so. My current options are:

a) PyGame.
b) FullScreen Browser and Flask-SocketIO.
c) Curses (text mode library. I don´t know if it can use a mouse and buttons).

Do I have other options? What do you thing will be the simpler option?

Thank you,
Márcio Moreira

EpixP3
Posts: 6
Joined: Sat Apr 18, 2015 7:07 pm

Re: Best options for FullScreen application

Mon May 25, 2015 6:54 pm

Try to use Tkinter:

Code: Select all

import Tkinter as tk       #Import Tkinter
root = tk.Tk()               #Bind Tkinter to the root object
root.geometry("800x600")             #Set the window dimensions
root.bind('<KeyPress>', onKeyPress)       #For example, bind the onKeyPress method (you must create it), and have some code 
                                                                       #done when key is pressed
root.mainloop()         #Starts the Tkinter and onKeyPress event
You can find more about Tkinter on other websites, I'm just suggesting it to you...

gkreidl
Posts: 6335
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Best options for FullScreen application

Mon May 25, 2015 8:00 pm

TKinter supports a full screen mode, although it is hard to find in the documentation:

Code: Select all

root.attributes('-fullscreen', True)
A good reference:
http://infohost.nmt.edu/tcc/help/pubs/t ... index.html
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

arqeco
Posts: 2
Joined: Mon May 25, 2015 11:58 am

Re: Best options for FullScreen application

Tue May 26, 2015 3:05 am

Hello Friends,

I have just tested kweb and it worked from command line. Very nice. And it passed a Server-Sent Event test I´ve found online. Very good option.

On the other side, I couldn´t find a way to run a Tkinter python script out of a window manager, straight from the command line. Can it be done? I am looking for this to let the Pi works as lightweight as possible.

Thank you,
Márcio

gkreidl
Posts: 6335
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Best options for FullScreen application

Tue May 26, 2015 4:00 am

For a TKinter application you need at least X-Server and some kind of window-manager running.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

Return to “Python”