Commit 581af472 authored by Jorge Suárez de Lis's avatar Jorge Suárez de Lis 💭

First commit

parents
# Existing Software
This Python Script launches a window telling us it just exists and please, notice it exists.
## Website
This software has a website accessible through https://gitlab-pages.pages.citius.usc.es/existing-software.
The website has been built with the instructions specified in https://gitlab-pages.pages.citius.usc.es/.
Just click the "Existing repository" tab.
#!/usr/bin/python
# -*- coding: UTF-8 -*-
#
import os
import thread
import StringIO
import sys
import string
from gi.repository import GLib, Gtk, GObject
import signal
# Fix enconding in older Python
reload(sys)
sys.setdefaultencoding('utf8')
class NoticeMeSenpai:
def __init__( self):
self.window = Gtk.Window()
self.window.set_position(Gtk.WindowPosition.CENTER)
self.window.set_border_width(10)
self.title = "Please"
self.window.set_title("Please")
self.mainbox = Gtk.VBox(spacing=6)
self.window.add( self.mainbox)
self.label = Gtk.Label("Notice me, senpai", xalign=0)
self.mainbox.pack_start(self.label, True, True, 0)
self.label.show()
button_box = Gtk.HBox()
self.mainbox.pack_start( button_box, True, True, 0)
button_box.show()
b = Gtk.Button("I noticed you")
button_box.pack_start( b, True, True, 0)
b.show()
b.connect("clicked", self.destroy)
self.mainbox.show()
self.window.show_all()
def destroy(self,notused):
self.window.destroy()
def main():
# Calling GObject.threads_init() is not needed for PyGObject 3.10.2+
GObject.threads_init()
# Please
NoticeMeSenpai()
# Gtk main - call after first update
signal.signal(signal.SIGINT, signal.SIG_DFL)
Gtk.main()
if __name__ == "__main__":
main()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment