0

for a project i have to make a GUI for python. It should show some variables (temp etc). But I don't know how I can pass variables trough GTK to the window. Any answers appreciated :)

some info: I am using a RPi3, but that's nothing which is important, or is it? I have a 7" display attached, on which the program should be seen in full screen. In the end, there should stand sth like temp, humidity, water etc

I don't exactly know which GTK i use, but it's in python. So I think it's pygtk

Thanks for reading,

Fabian

TECHNOFAB
  • 121
  • 10
  • 1
    What does this have to do with HTML or CGI? – Daniel Roseman Jan 04 '18 at 10:08
  • Are you trying to create a native GUI in python using GTK+, or a you using a web view using webkitGTK? It's hard to understand and too vague to answer. As a side note, pygtk is the name of the old GTK+ 2 bindings. For GTK+ 3, you should use pygobject: https://python-gtk-3-tutorial.readthedocs.io/en/latest/ – liberforce Jan 04 '18 at 14:29
  • I only want to have a GUI for my python variables, and I would prefer styling it using Css/Html. What I've heard, a web server is better. You can pass the variables to Php or something like that. But it would be simpler if this would work without PHP, so only a HTML file where I can write something like that: – TECHNOFAB Jan 04 '18 at 16:28
  • %if.... Etc. Would be cool if it would work without PHP – TECHNOFAB Jan 04 '18 at 16:29
  • This is still unclear. Where are your "variables"? In configuration files? Is your GUI program the one that is suposed to be displayed in fullscreen on the display attached ot the RPi? If the answer is yes, then I fail to see the need for a web server. With GTK+ 3 you can style a native GUI using CCS, no need for a web view or web server for that. – liberforce Jan 05 '18 at 10:33

1 Answers1

1

Done. I've used Flask, Socket.io and gtk to make an app, showing a html file in full screen, with python variables in it.

TECHNOFAB
  • 121
  • 10