Below it is the first hello world program that I googled up. I've attached the screenshot of memory consuption as reported by htop.
#!/usr/bin/env python from gi.repository import Gtk, Gio class HelloWorldApp(Gtk.Application): def __init__(self): Gtk.Application.__init__(self, application_id="apps.test.helloworld", flags=Gio.ApplicationFlags.FLAGS_NONE) self.connect("activate", self.on_activate) def on_activate(self, data=None): window = Gtk.Window(type=Gtk.WindowType.TOPLEVEL) window.set_title("Gtk3 Python Example") window.set_border_width(24) label = Gtk.Label("Hello World!") window.add(label) window.show_all() self.add_window(window) if __name__ == "__main__": app = HelloWorldApp() app.run(None)
Below it is the first hello world program that I googled up. I've attached the screenshot of memory consuption as reported by htop.
#!/usr/bin/env python Gtk.Application ):
Gtk.Applicatio n.__init_ _(self, application_ id="apps. test.helloworld ",
flags= Gio.Application Flags.FLAGS_ NONE)
self.connect( "activate" , self.on_activate) type=Gtk. WindowType. TOPLEVEL)
window. set_title( "Gtk3 Python Example")
window. set_border_ width(24)
window. add(label)
window. show_all( )
self.add_ window( window)
from gi.repository import Gtk, Gio
class HelloWorldApp(
def __init__(self):
def on_activate(self, data=None):
window = Gtk.Window(
label = Gtk.Label("Hello World!")
if __name__ == "__main__":
app = HelloWorldApp()
app.run(None)