import dbus
import subprocess
import gsmdecode
+import sys
from dbus.mainloop.glib import DBusGMainLoop
try :
word += reply1
ws = 0
num = -1
+ subst = ''
# Delete backslash if it delimites usual numbers from % or &
if str[i] == '\\' and i < len(str)-1 and str[i+1] in ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0"] :
continue
# The code below is just for testing purposes.
# It allows to run the widget as a standalone process.
if __name__ == "__main__":
+ plugin_id = "ussd-widget.console"
+ if len(sys.argv) == 2:
+ try:
+ plugin_id = "ussd-widget.desktop-"+str(int(sys.argv[1]))
+ except:
+ print "Plugin id must be integer"
+ sys.exit(-1)
+
import gobject
gobject.type_register(hd_plugin_type)
- obj = gobject.new(hd_plugin_type, plugin_id="plugin_id")
+ obj = gobject.new(hd_plugin_type, plugin_id=plugin_id)
obj.show_all()
gtk.main()