-#!/usr/bin/python
+#!/usr/bin/python3
# -*- coding: utf-8 -*-
from gi.repository import GLib
lock = "on"
if in_key == '0':
print_send_sms_menu()
- sms_type = raw_input('Select SMS type: ')
+ sms_type = input('Select SMS type: ')
if sms_type == '1':
message_send(sms, number, value)
elif in_key == '1':
message_delivery_report(sms, 1)
- send_msg = raw_input('Send test message[y/n]?: ')
+ send_msg = input('Send test message[y/n]?: ')
if send_msg == 'y':
message_send(sms, number, ("(1)" + value +
": UseDeliveryReports[TRUE]"))
elif in_key == '2':
message_delivery_report(sms, 0)
- send_msg = raw_input('Send test message[y/n]?: ')
+ send_msg = input('Send test message[y/n]?: ')
if send_msg == 'y':
message_send(sms, number, ("(2) " + value +
": UseDeliveryReports[FALSE]"))
elif in_key == '3':
message_service_center_address(sms, SCA)
- send_msg = raw_input('Send test message[y/n]?: ')
+ send_msg = input('Send test message[y/n]?: ')
if send_msg == 'y':
message_send(sms, number, ("(3) " + value +
": ServiceCenterAddress"))
elif in_key == '4':
message_bearer(sms, "ps-only")
- send_msg = raw_input('Send test message[y/n]?: ')
+ send_msg = input('Send test message[y/n]?: ')
if send_msg == 'y':
message_send(sms, number, ("(4) " + value +
": Bearer[ps-only]"))
elif in_key == '5':
message_bearer(sms, "cs-only")
- send_msg = raw_input('Send test message[y/n]?: ')
+ send_msg = input('Send test message[y/n]?: ')
if send_msg == 'y':
message_send(sms, number, ("(5) " + value +
": Bearer[cs-only]"))
elif in_key == '6':
message_bearer(sms, "ps-preferred")
- send_msg = raw_input('Send test message[y/n]?: ')
+ send_msg = input('Send test message[y/n]?: ')
if send_msg == 'y':
message_send(sms, number, ("(6) " + value +
": Bearer[ps-preferred]"))
elif in_key == '7':
message_bearer(sms, "cs-preferred")
- send_msg = raw_input('Send test message[y/n]?: ')
+ send_msg = input('Send test message[y/n]?: ')
if send_msg == 'y':
message_send(sms,number, ("(7) " + value +
": Bearer[cs-preferred]"))
-#!/usr/bin/python
+#!/usr/bin/python3
from gi.repository import GLib
index += 1
print("\nDefault: %d" % (default))
- select = raw_input("Enter Selection (t, b):")
+ select = input("Enter Selection (t, b):")
if select == 'b':
raise GoBack("User wishes to go back")
print("DisplayText (%s)" % (title))
print("Icon: (%d)" % (icon))
print("Urgent: (%d)" % (urgent))
- key = raw_input("Press return to clear ('t' terminates, "
+ key = input("Press return to clear ('t' terminates, "
"'b' goes back, 'n' busy, "
"'w' return and wait):")
print("Hide typing: (%s)" % (hide_typing))
print("Enter characters, min: %d, max: %d:" % (min_chars,
max_chars))
- userin = raw_input("")
+ userin = input("")
return userin
print("Hide typing: (%s)" % (hide_typing))
print("Enter digits, min: %d, max: %d:" % (min_chars,
max_chars))
- userin = raw_input("'t' terminates, 'b' goes back:")
+ userin = input("'t' terminates, 'b' goes back:")
if userin == 'b':
raise GoBack("User wishes to go back")
def RequestKey(self, title, icon):
print("Title: (%s)" % (title))
print("Icon: (%d)" % (icon))
- key = raw_input("Enter Key (t, b):")
+ key = input("Enter Key (t, b):")
if key == 'b':
raise GoBack("User wishes to go back")
def RequestDigit(self, title, icon):
print("Title: (%s)" % (title))
print("Icon: (%d)" % (icon))
- key = raw_input("Enter Digit (t, b):")
+ key = input("Enter Digit (t, b):")
if key == 'b':
raise GoBack("User wishes to go back")
def RequestQuickDigit(self, title, icon):
print("Title: (%s)" % (title))
print("Icon: (%d)" % (icon))
- key = raw_input("Quick digit (0-9, *, #, t, b):")
+ key = input("Quick digit (0-9, *, #, t, b):")
if key == 'b':
raise GoBack("User wishes to go back")
def RequestConfirmation(self, title, icon):
print("Title: (%s)" % (title))
print("Icon: (%d)" % (icon))
- key = raw_input("Enter Confirmation (t, b, y, n):")
+ key = input("Enter Confirmation (t, b, y, n):")
if key == 'b':
raise GoBack("User wishes to go back")
def ConfirmCallSetup(self, info, icon):
print("Information: (%s)" % (info))
print("Icon: (%d)" % (icon))
- key = raw_input("Enter Confirmation (t, y, n):")
+ key = input("Enter Confirmation (t, y, n):")
if key == 't':
raise EndSession("User wishes to terminate session")
print("Information: (%s)" % (info))
print("Icon: (%d)" % (icon))
print("URL (%s)" % (url))
- key = raw_input("Enter Confirmation (y, n):")
+ key = input("Enter Confirmation (y, n):")
if key == 'y':
return True
signal.alarm(5)
try:
- key = raw_input("Press return to end before end of"
+ key = input("Press return to end before end of"
" single tone (t):")
signal.alarm(0)
print("LoopTone: %s" % (tone))
print("Text: %s" % (text))
print("Icon: %d" % (icon))
- key = raw_input("Press return to end before timeout "
+ key = input("Press return to end before timeout "
"('t' terminates, 'w' return and wait):")
if key == 'w':
def DisplayAction(self, text, icon):
print("Text: (%s)" % (text))
print("Icon: (%d)" % (icon))
- key = raw_input("Press 't' to terminate the session ")
+ key = input("Press 't' to terminate the session ")
if key == 't':
raise EndSession("User wishes to terminate session")
def ConfirmOpenChannel(self, info, icon):
print("Open channel confirmation: (%s)" % (info))
print("Icon: (%d)" % (icon))
- key = raw_input("Enter Confirmation (t, y, n):")
+ key = input("Enter Confirmation (t, y, n):")
if key == 't':
raise EndSession("User wishes to terminate session")
return False
_dbus2py = {
- dbus.String : unicode,
+ dbus.String : str,
dbus.UInt32 : int,
dbus.Int32 : int,
dbus.Int16 : int,
except:
pass
- select = int(raw_input("Enter Selection: "))
+ select = int(input("Enter Selection: "))
stk.SelectItem(select, path)
elif mode == 'agent':
path = "/test/agent"