This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from gi.repository import Gtk | |
builder = Gtk.Builder() | |
builder.add_from_string( | |
""" | |
<?xml version="1.0" encoding="UTF-8"?> | |
<interface> | |
<object class="GtkWindow" id="window1"> | |
<property name="can_focus">False</property> | |
<child> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [1]: import pynotify | |
In [2]: pynotify.init("Sample Application Title") | |
Out[2]: True | |
In [3]: n = pynotify.Notification("Title", "Message") | |
In [4]: n.add_action("buttonid", "Happy Button :)", lambda x: x) | |
In [5]: n.show() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import codecs | |
import sys | |
try: | |
inp = codecs.open(sys.argv[1],'r','cp1250') | |
except IndexError: | |
print('You need to give me text file with qnapi subtitles as an argument. Thanks.') | |
else: |
NewerOlder