summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMartin Pitt <martin.pitt@ubuntu.com>2014-03-11 17:39:22 +0100
committerDenis Kenzior <denkenz@gmail.com>2014-03-11 19:34:08 -0500
commitc027ab9fbc1a8e8c9e76bcd123df1ad7696307c2 (patch)
treee2e4296e475794f65139671027d160b4526c6d20 /test
parentad4f90684fac01be21789df40882fb9869c3cd41 (diff)
downloadofono-c027ab9fbc1a8e8c9e76bcd123df1ad7696307c2.tar.bz2
test: Convert to Python 3
Change raw_input() to input() and unicode to str. This is *not* compatible with Python 2. Update the hashbangs to run with Python 3.
Diffstat (limited to 'test')
-rwxr-xr-xtest/activate-context2
-rwxr-xr-xtest/answer-calls2
-rwxr-xr-xtest/backtrace2
-rwxr-xr-xtest/cancel-ussd2
-rwxr-xr-xtest/cdma-connman-disable2
-rwxr-xr-xtest/cdma-connman-enable2
-rwxr-xr-xtest/cdma-dial-number2
-rwxr-xr-xtest/cdma-hangup2
-rwxr-xr-xtest/cdma-list-call2
-rwxr-xr-xtest/cdma-set-credentials2
-rwxr-xr-xtest/change-pin2
-rwxr-xr-xtest/create-internet-context2
-rwxr-xr-xtest/create-mms-context2
-rwxr-xr-xtest/create-multiparty2
-rwxr-xr-xtest/deactivate-all2
-rwxr-xr-xtest/deactivate-context2
-rwxr-xr-xtest/dial-number2
-rwxr-xr-xtest/disable-call-forwarding2
-rwxr-xr-xtest/disable-gprs2
-rwxr-xr-xtest/disable-modem2
-rwxr-xr-xtest/display-icon2
-rwxr-xr-xtest/dundee-connect2
-rwxr-xr-xtest/dundee-disconnect2
-rwxr-xr-xtest/enable-cbs2
-rwxr-xr-xtest/enable-gprs2
-rwxr-xr-xtest/enable-modem2
-rwxr-xr-xtest/enter-pin2
-rwxr-xr-xtest/get-icon2
-rwxr-xr-xtest/get-operators2
-rwxr-xr-xtest/get-tech-preference2
-rwxr-xr-xtest/hangup-active2
-rwxr-xr-xtest/hangup-all2
-rwxr-xr-xtest/hangup-call2
-rwxr-xr-xtest/hangup-multiparty2
-rwxr-xr-xtest/hold-and-answer2
-rwxr-xr-xtest/initiate-ussd4
-rwxr-xr-xtest/list-calls2
-rwxr-xr-xtest/list-contexts2
-rwxr-xr-xtest/list-messages2
-rwxr-xr-xtest/list-modems2
-rwxr-xr-xtest/list-operators2
-rwxr-xr-xtest/lock-pin2
-rwxr-xr-xtest/lockdown-modem2
-rwxr-xr-xtest/monitor-dundee4
-rwxr-xr-xtest/monitor-ofono4
-rwxr-xr-xtest/offline-modem2
-rwxr-xr-xtest/online-modem2
-rwxr-xr-xtest/private-chat2
-rwxr-xr-xtest/process-context-settings2
-rwxr-xr-xtest/receive-sms2
-rwxr-xr-xtest/reject-calls2
-rwxr-xr-xtest/release-and-answer2
-rwxr-xr-xtest/release-and-swap2
-rwxr-xr-xtest/remove-contexts2
-rwxr-xr-xtest/reset-pin2
-rwxr-xr-xtest/scan-for-operators2
-rwxr-xr-xtest/send-sms2
-rwxr-xr-xtest/send-ussd4
-rwxr-xr-xtest/send-vcal2
-rwxr-xr-xtest/send-vcard2
-rwxr-xr-xtest/set-call-forwarding2
-rwxr-xr-xtest/set-cbs-topics2
-rwxr-xr-xtest/set-context-property2
-rwxr-xr-xtest/set-fast-dormancy2
-rwxr-xr-xtest/set-gsm-band2
-rwxr-xr-xtest/set-mic-volume2
-rwxr-xr-xtest/set-mms-details2
-rwxr-xr-xtest/set-msisdn2
-rwxr-xr-xtest/set-roaming-allowed2
-rwxr-xr-xtest/set-speaker-volume2
-rwxr-xr-xtest/set-tech-preference2
-rwxr-xr-xtest/set-tty2
-rwxr-xr-xtest/set-umts-band2
-rwxr-xr-xtest/set-use-sms-reports2
-rwxr-xr-xtest/swap-calls2
-rwxr-xr-xtest/test-advice-of-charge2
-rwxr-xr-xtest/test-call-barring2
-rwxr-xr-xtest/test-call-forwarding2
-rwxr-xr-xtest/test-call-settings2
-rwxr-xr-xtest/test-cbs4
-rwxr-xr-xtest/test-gnss4
-rwxr-xr-xtest/test-message-waiting2
-rwxr-xr-xtest/test-modem2
-rwxr-xr-xtest/test-network-registration2
-rwxr-xr-xtest/test-phonebook2
-rwxr-xr-xtest/test-push-notification2
-rwxr-xr-xtest/test-smart-messaging2
-rwxr-xr-xtest/test-sms18
-rwxr-xr-xtest/test-ss2
-rwxr-xr-xtest/test-ss-control-cb2
-rwxr-xr-xtest/test-ss-control-cf2
-rwxr-xr-xtest/test-ss-control-cs2
-rwxr-xr-xtest/test-stk-menu34
-rwxr-xr-xtest/unlock-pin2
94 files changed, 124 insertions, 124 deletions
diff --git a/test/activate-context b/test/activate-context
index 937b7dbf..22ad1734 100755
--- a/test/activate-context
+++ b/test/activate-context
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import sys
import dbus
diff --git a/test/answer-calls b/test/answer-calls
index 45ff08f8..daa794b8 100755
--- a/test/answer-calls
+++ b/test/answer-calls
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import dbus
diff --git a/test/backtrace b/test/backtrace
index c6247090..03c76327 100755
--- a/test/backtrace
+++ b/test/backtrace
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import os
import re
diff --git a/test/cancel-ussd b/test/cancel-ussd
index 1797f260..e7559bab 100755
--- a/test/cancel-ussd
+++ b/test/cancel-ussd
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import sys
import dbus
diff --git a/test/cdma-connman-disable b/test/cdma-connman-disable
index 0ddc0cdd..3adc14d1 100755
--- a/test/cdma-connman-disable
+++ b/test/cdma-connman-disable
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import dbus
import sys
diff --git a/test/cdma-connman-enable b/test/cdma-connman-enable
index a3cca017..ac16a2da 100755
--- a/test/cdma-connman-enable
+++ b/test/cdma-connman-enable
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import dbus
import sys
diff --git a/test/cdma-dial-number b/test/cdma-dial-number
index 9cdfb24c..683431e6 100755
--- a/test/cdma-dial-number
+++ b/test/cdma-dial-number
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import sys
import dbus
diff --git a/test/cdma-hangup b/test/cdma-hangup
index 493ece41..41ffa60c 100755
--- a/test/cdma-hangup
+++ b/test/cdma-hangup
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import sys
import dbus
diff --git a/test/cdma-list-call b/test/cdma-list-call
index 5d36a699..b132353a 100755
--- a/test/cdma-list-call
+++ b/test/cdma-list-call
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import dbus
diff --git a/test/cdma-set-credentials b/test/cdma-set-credentials
index a286b0e8..a60c86ed 100755
--- a/test/cdma-set-credentials
+++ b/test/cdma-set-credentials
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import dbus
import sys
diff --git a/test/change-pin b/test/change-pin
index 000ce535..301c6ceb 100755
--- a/test/change-pin
+++ b/test/change-pin
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import dbus
import sys
diff --git a/test/create-internet-context b/test/create-internet-context
index efd09986..1089053c 100755
--- a/test/create-internet-context
+++ b/test/create-internet-context
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import sys
import dbus
diff --git a/test/create-mms-context b/test/create-mms-context
index e5be08de..598336f5 100755
--- a/test/create-mms-context
+++ b/test/create-mms-context
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import sys
import dbus
diff --git a/test/create-multiparty b/test/create-multiparty
index 44a78f71..b6395e8e 100755
--- a/test/create-multiparty
+++ b/test/create-multiparty
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import sys
import dbus
diff --git a/test/deactivate-all b/test/deactivate-all
index 427009e8..5aa85871 100755
--- a/test/deactivate-all
+++ b/test/deactivate-all
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import sys
import dbus
diff --git a/test/deactivate-context b/test/deactivate-context
index 848bcbd6..bc2ffd31 100755
--- a/test/deactivate-context
+++ b/test/deactivate-context
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import sys
import dbus
diff --git a/test/dial-number b/test/dial-number
index ee674d98..fe5adad3 100755
--- a/test/dial-number
+++ b/test/dial-number
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import sys
import dbus
diff --git a/test/disable-call-forwarding b/test/disable-call-forwarding
index 36098162..811e4fa7 100755
--- a/test/disable-call-forwarding
+++ b/test/disable-call-forwarding
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import sys
from gi.repository import GLib
diff --git a/test/disable-gprs b/test/disable-gprs
index c6c40a5e..61ce216c 100755
--- a/test/disable-gprs
+++ b/test/disable-gprs
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import dbus
import sys
diff --git a/test/disable-modem b/test/disable-modem
index ca8c8d89..6fba8570 100755
--- a/test/disable-modem
+++ b/test/disable-modem
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import dbus
import sys
diff --git a/test/display-icon b/test/display-icon
index 753d14d8..ac408181 100755
--- a/test/display-icon
+++ b/test/display-icon
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import sys
import dbus
diff --git a/test/dundee-connect b/test/dundee-connect
index a23ce5f6..77b16b82 100755
--- a/test/dundee-connect
+++ b/test/dundee-connect
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import dbus
import sys
diff --git a/test/dundee-disconnect b/test/dundee-disconnect
index 05403dd0..4c3f048e 100755
--- a/test/dundee-disconnect
+++ b/test/dundee-disconnect
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import dbus
import sys
diff --git a/test/enable-cbs b/test/enable-cbs
index c08bf2b3..4a8bf665 100755
--- a/test/enable-cbs
+++ b/test/enable-cbs
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import dbus
import sys
diff --git a/test/enable-gprs b/test/enable-gprs
index 8664891f..68d5ef09 100755
--- a/test/enable-gprs
+++ b/test/enable-gprs
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import dbus
import sys
diff --git a/test/enable-modem b/test/enable-modem
index dfaaaa85..fc5958a6 100755
--- a/test/enable-modem
+++ b/test/enable-modem
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import dbus
import sys
diff --git a/test/enter-pin b/test/enter-pin
index c6ee669c..95563632 100755
--- a/test/enter-pin
+++ b/test/enter-pin
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import dbus
import sys
diff --git a/test/get-icon b/test/get-icon
index fdaaee7f..5569a332 100755
--- a/test/get-icon
+++ b/test/get-icon
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import dbus
import sys
diff --git a/test/get-operators b/test/get-operators
index 62354c5a..0f35c80a 100755
--- a/test/get-operators
+++ b/test/get-operators
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import dbus
import sys
diff --git a/test/get-tech-preference b/test/get-tech-preference
index 77d20d01..7ba6365e 100755
--- a/test/get-tech-preference
+++ b/test/get-tech-preference
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import dbus, sys
diff --git a/test/hangup-active b/test/hangup-active
index 1dd85a65..8e65bc46 100755
--- a/test/hangup-active
+++ b/test/hangup-active
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import sys
import dbus
diff --git a/test/hangup-all b/test/hangup-all
index 32933db0..3a0138db 100755
--- a/test/hangup-all
+++ b/test/hangup-all
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import sys
import dbus
diff --git a/test/hangup-call b/test/hangup-call
index 447020c0..5a2de20e 100755
--- a/test/hangup-call
+++ b/test/hangup-call
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import sys
import dbus
diff --git a/test/hangup-multiparty b/test/hangup-multiparty
index 48fe3428..24751c3a 100755
--- a/test/hangup-multiparty
+++ b/test/hangup-multiparty
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import sys
import dbus
diff --git a/test/hold-and-answer b/test/hold-and-answer
index 2c47e275..da3be577 100755
--- a/test/hold-and-answer
+++ b/test/hold-and-answer
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import sys
import dbus
diff --git a/test/initiate-ussd b/test/initiate-ussd
index d7022f1d..faf50d0f 100755
--- a/test/initiate-ussd
+++ b/test/initiate-ussd
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import sys
import dbus
@@ -45,7 +45,7 @@ if state == "idle":
print("State: %s" % (state))
while state == "user-response":
- response = raw_input("Enter response: ")
+ response = input("Enter response: ")
result = ussd.Respond(response, timeout=100)
diff --git a/test/list-calls b/test/list-calls
index 08668c65..f3ee9919 100755
--- a/test/list-calls
+++ b/test/list-calls
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import dbus
diff --git a/test/list-contexts b/test/list-contexts
index f0d40942..78278cac 100755
--- a/test/list-contexts
+++ b/test/list-contexts
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import dbus
diff --git a/test/list-messages b/test/list-messages
index cfccbea8..9f5bce34 100755
--- a/test/list-messages
+++ b/test/list-messages
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import dbus
diff --git a/test/list-modems b/test/list-modems
index ed66124f..b9f510a8 100755
--- a/test/list-modems
+++ b/test/list-modems
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import dbus
diff --git a/test/list-operators b/test/list-operators
index 349bf419..064c4e34 100755
--- a/test/list-operators
+++ b/test/list-operators
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import dbus
import sys
diff --git a/test/lock-pin b/test/lock-pin
index 5579735e..96ea9c22 100755
--- a/test/lock-pin
+++ b/test/lock-pin
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import dbus
import sys
diff --git a/test/lockdown-modem b/test/lockdown-modem
index 781abb69..4e04205a 100755
--- a/test/lockdown-modem
+++ b/test/lockdown-modem
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import dbus
import sys
diff --git a/test/monitor-dundee b/test/monitor-dundee
index e68488aa..5282a938 100755
--- a/test/monitor-dundee
+++ b/test/monitor-dundee
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
from gi.repository import GLib
@@ -6,7 +6,7 @@ import dbus
import dbus.mainloop.glib
_dbus2py = {
- dbus.String : unicode,
+ dbus.String : str,
dbus.UInt32 : int,
dbus.Int32 : int,
dbus.Int16 : int,
diff --git a/test/monitor-ofono b/test/monitor-ofono
index bd316171..8830757e 100755
--- a/test/monitor-ofono
+++ b/test/monitor-ofono
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
from gi.repository import GLib
@@ -6,7 +6,7 @@ import dbus
import dbus.mainloop.glib
_dbus2py = {
- dbus.String : unicode,
+ dbus.String : str,
dbus.UInt32 : int,
dbus.Int32 : int,
dbus.Int16 : int,
diff --git a/test/offline-modem b/test/offline-modem
index ea1f5223..e8c043a6 100755
--- a/test/offline-modem
+++ b/test/offline-modem
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import dbus, sys
diff --git a/test/online-modem b/test/online-modem
index 310ed7df..029c4a5a 100755
--- a/test/online-modem
+++ b/test/online-modem
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import dbus, sys
diff --git a/test/private-chat b/test/private-chat
index 254522e9..17d17d0b 100755
--- a/test/private-chat
+++ b/test/private-chat
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import sys
import dbus
diff --git a/test/process-context-settings b/test/process-context-settings
index 0f058b2a..8a3ecfa7 100755
--- a/test/process-context-settings
+++ b/test/process-context-settings
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import os
import dbus
diff --git a/test/receive-sms b/test/receive-sms
index c23eb146..a0c69150 100755
--- a/test/receive-sms
+++ b/test/receive-sms
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
from gi.repository import GLib
diff --git a/test/reject-calls b/test/reject-calls
index 9edf1fff..71b243ee 100755
--- a/test/reject-calls
+++ b/test/reject-calls
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import dbus
diff --git a/test/release-and-answer b/test/release-and-answer
index ef860fc3..62eaa79c 100755
--- a/test/release-and-answer
+++ b/test/release-and-answer
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import dbus
diff --git a/test/release-and-swap b/test/release-and-swap
index 2748f207..b4c0af1d 100755
--- a/test/release-and-swap
+++ b/test/release-and-swap
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import dbus
diff --git a/test/remove-contexts b/test/remove-contexts
index c5082cb3..b54184e6 100755
--- a/test/remove-contexts
+++ b/test/remove-contexts
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import dbus
diff --git a/test/reset-pin b/test/reset-pin
index b429254e..3fbd1263 100755
--- a/test/reset-pin
+++ b/test/reset-pin
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import dbus
import sys
diff --git a/test/scan-for-operators b/test/scan-for-operators
index 749c7106..b4fc05e2 100755
--- a/test/scan-for-operators
+++ b/test/scan-for-operators
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import dbus
import sys
diff --git a/test/send-sms b/test/send-sms
index e06444db..98808aaf 100755
--- a/test/send-sms
+++ b/test/send-sms
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import sys
import dbus
diff --git a/test/send-ussd b/test/send-ussd
index e5858836..a20e0987 100755
--- a/test/send-ussd
+++ b/test/send-ussd
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import sys
import dbus
@@ -46,7 +46,7 @@ if state == "idle":
print("State: %s" % (state))
while state == "user-response":
- response = raw_input("Enter response: ")
+ response = input("Enter response: ")
print(ussd.Respond(response, timeout=100))
diff --git a/test/send-vcal b/test/send-vcal
index 7f8272be..566daef9 100755
--- a/test/send-vcal
+++ b/test/send-vcal
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import sys
import dbus
diff --git a/test/send-vcard b/test/send-vcard
index 250b36fe..4dedf511 100755
--- a/test/send-vcard
+++ b/test/send-vcard
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import sys
import dbus
diff --git a/test/set-call-forwarding b/test/set-call-forwarding
index 9fd358be..49d1ce0d 100755
--- a/test/set-call-forwarding
+++ b/test/set-call-forwarding
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import sys
from gi.repository import GLib
diff --git a/test/set-cbs-topics b/test/set-cbs-topics
index 78d6d449..db95e169 100755
--- a/test/set-cbs-topics
+++ b/test/set-cbs-topics
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import dbus
import sys
diff --git a/test/set-context-property b/test/set-context-property
index 64a6fb87..5ff7a677 100755
--- a/test/set-context-property
+++ b/test/set-context-property
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import sys
import dbus
diff --git a/test/set-fast-dormancy b/test/set-fast-dormancy
index 7bf77155..ef77bcda 100755
--- a/test/set-fast-dormancy
+++ b/test/set-fast-dormancy
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import dbus
import sys
diff --git a/test/set-gsm-band b/test/set-gsm-band
index 3c17c108..b37bcb57 100755
--- a/test/set-gsm-band
+++ b/test/set-gsm-band
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import dbus
import sys
diff --git a/test/set-mic-volume b/test/set-mic-volume
index e0bff494..cd6c73fa 100755
--- a/test/set-mic-volume
+++ b/test/set-mic-volume
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import sys
import dbus
diff --git a/test/set-mms-details b/test/set-mms-details
index d2d08386..6ee59fac 100755
--- a/test/set-mms-details
+++ b/test/set-mms-details
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import sys
import dbus
diff --git a/test/set-msisdn b/test/set-msisdn
index 01f284dd..b5fe8194 100755
--- a/test/set-msisdn
+++ b/test/set-msisdn
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import dbus
import sys
diff --git a/test/set-roaming-allowed b/test/set-roaming-allowed
index 9e3e0580..698c8b6a 100755
--- a/test/set-roaming-allowed
+++ b/test/set-roaming-allowed
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import sys
import dbus
diff --git a/test/set-speaker-volume b/test/set-speaker-volume
index 7962f39c..6d4e3019 100755
--- a/test/set-speaker-volume
+++ b/test/set-speaker-volume
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import sys
import dbus
diff --git a/test/set-tech-preference b/test/set-tech-preference
index 2666cbd1..b549abcc 100755
--- a/test/set-tech-preference
+++ b/test/set-tech-preference
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import dbus
import sys
diff --git a/test/set-tty b/test/set-tty
index 53d6b995..eed1fbaf 100755
--- a/test/set-tty
+++ b/test/set-tty
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import dbus
import sys
diff --git a/test/set-umts-band b/test/set-umts-band
index c1e6448e..0bae5c45 100755
--- a/test/set-umts-band
+++ b/test/set-umts-band
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import dbus
import sys
diff --git a/test/set-use-sms-reports b/test/set-use-sms-reports
index a4efe4f2..288d4e16 100755
--- a/test/set-use-sms-reports
+++ b/test/set-use-sms-reports
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import dbus
import sys
diff --git a/test/swap-calls b/test/swap-calls
index eeb257b6..018a8d37 100755
--- a/test/swap-calls
+++ b/test/swap-calls
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import sys
import dbus
diff --git a/test/test-advice-of-charge b/test/test-advice-of-charge
index 0f1f57ff..6e87e61a 100755
--- a/test/test-advice-of-charge
+++ b/test/test-advice-of-charge
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
from gi.repository import GLib
import sys
diff --git a/test/test-call-barring b/test/test-call-barring
index be4ab575..eedb69ff 100755
--- a/test/test-call-barring
+++ b/test/test-call-barring
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
from gi.repository import GLib
import sys
diff --git a/test/test-call-forwarding b/test/test-call-forwarding
index 01a72941..5db84d77 100755
--- a/test/test-call-forwarding
+++ b/test/test-call-forwarding
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
from gi.repository import GLib
diff --git a/test/test-call-settings b/test/test-call-settings
index 5d7ee49e..435594c9 100755
--- a/test/test-call-settings
+++ b/test/test-call-settings
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
from gi.repository import GLib
diff --git a/test/test-cbs b/test/test-cbs
index 13cdd80a..a5cec065 100755
--- a/test/test-cbs
+++ b/test/test-cbs
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import dbus
import dbus.mainloop.glib
@@ -78,7 +78,7 @@ def set_topics(cbs):
invalidData = False;
index = 0
- topics = raw_input('Enter the topic ID(s) you want to register to: ')
+ topics = input('Enter the topic ID(s) you want to register to: ')
while index < len(topics):
if topics[index] == ',' or topics[index] == '-':
diff --git a/test/test-gnss b/test/test-gnss
index aa0b160c..6ae64dbd 100755
--- a/test/test-gnss
+++ b/test/test-gnss
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
from gi.repository import GLib
import sys
@@ -40,7 +40,7 @@ def print_menu():
def stdin_handler(channel, condition, gnss, path):
in_key = os.read(channel.unix_get_fd(), 160).rstrip().decode('UTF-8')
if in_key == '0':
- xml = raw_input('type the element and press enter: ')
+ xml = input('type the element and press enter: ')
try:
gnss.SendPositioningElement(dbus.String(xml))
print("ok")
diff --git a/test/test-message-waiting b/test/test-message-waiting
index b93fbf39..432862ec 100755
--- a/test/test-message-waiting
+++ b/test/test-message-waiting
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
from gi.repository import GLib
import sys
diff --git a/test/test-modem b/test/test-modem
index 29dbf14a..aa38b1fc 100755
--- a/test/test-modem
+++ b/test/test-modem
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
from gi.repository import GLib
diff --git a/test/test-network-registration b/test/test-network-registration
index c5ad5864..68b43476 100755
--- a/test/test-network-registration
+++ b/test/test-network-registration
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
from gi.repository import GLib
import sys
diff --git a/test/test-phonebook b/test/test-phonebook
index 116fd4f1..42646d33 100755
--- a/test/test-phonebook
+++ b/test/test-phonebook
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import dbus, sys
diff --git a/test/test-push-notification b/test/test-push-notification
index ecc6afbf..d972ad3f 100755
--- a/test/test-push-notification
+++ b/test/test-push-notification
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
from gi.repository import GLib
diff --git a/test/test-smart-messaging b/test/test-smart-messaging
index 188ac1ee..f22efd25 100755
--- a/test/test-smart-messaging
+++ b/test/test-smart-messaging
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
from gi.repository import GLib
diff --git a/test/test-sms b/test/test-sms
index 49935e11..30ac651c 100755
--- a/test/test-sms
+++ b/test/test-sms
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# -*- coding: utf-8 -*-
from gi.repository import GLib
@@ -132,7 +132,7 @@ def stdin_handler(channel, condition, sms, value, number):
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)
@@ -150,49 +150,49 @@ def stdin_handler(channel, condition, sms, value, number):
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]"))
diff --git a/test/test-ss b/test/test-ss
index 2c80806e..4cd87322 100755
--- a/test/test-ss
+++ b/test/test-ss
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import sys
import dbus
diff --git a/test/test-ss-control-cb b/test/test-ss-control-cb
index 86bac9b0..ddae6d3e 100755
--- a/test/test-ss-control-cb
+++ b/test/test-ss-control-cb
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
from gi.repository import GLib
diff --git a/test/test-ss-control-cf b/test/test-ss-control-cf
index d30bf4f8..095eb5d9 100755
--- a/test/test-ss-control-cf
+++ b/test/test-ss-control-cf
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
from gi.repository import GLib
diff --git a/test/test-ss-control-cs b/test/test-ss-control-cs
index e0ed1d1a..81804741 100755
--- a/test/test-ss-control-cs
+++ b/test/test-ss-control-cs
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
from gi.repository import GLib
diff --git a/test/test-stk-menu b/test/test-stk-menu
index e76f2922..9ef92a1a 100755
--- a/test/test-stk-menu
+++ b/test/test-stk-menu
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
from gi.repository import GLib
@@ -57,7 +57,7 @@ class StkAgent(dbus.service.Object):
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")
@@ -74,7 +74,7 @@ class StkAgent(dbus.service.Object):
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):")
@@ -107,7 +107,7 @@ class StkAgent(dbus.service.Object):
print("Hide typing: (%s)" % (hide_typing))
print("Enter characters, min: %d, max: %d:" % (min_chars,
max_chars))
- userin = raw_input("")
+ userin = input("")
return userin
@@ -121,7 +121,7 @@ class StkAgent(dbus.service.Object):
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")
@@ -135,7 +135,7 @@ class StkAgent(dbus.service.Object):
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")
@@ -149,7 +149,7 @@ class StkAgent(dbus.service.Object):
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")
@@ -163,7 +163,7 @@ class StkAgent(dbus.service.Object):
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")
@@ -177,7 +177,7 @@ class StkAgent(dbus.service.Object):
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")
@@ -193,7 +193,7 @@ class StkAgent(dbus.service.Object):
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")
@@ -208,7 +208,7 @@ class StkAgent(dbus.service.Object):
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
@@ -231,7 +231,7 @@ class StkAgent(dbus.service.Object):
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)
@@ -249,7 +249,7 @@ class StkAgent(dbus.service.Object):
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':
@@ -278,7 +278,7 @@ class StkAgent(dbus.service.Object):
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")
@@ -288,7 +288,7 @@ class StkAgent(dbus.service.Object):
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")
@@ -298,7 +298,7 @@ class StkAgent(dbus.service.Object):
return False
_dbus2py = {
- dbus.String : unicode,
+ dbus.String : str,
dbus.UInt32 : int,
dbus.Int32 : int,
dbus.Int16 : int,
@@ -395,7 +395,7 @@ if __name__ == '__main__':
except:
pass
- select = int(raw_input("Enter Selection: "))
+ select = int(input("Enter Selection: "))
stk.SelectItem(select, path)
elif mode == 'agent':
path = "/test/agent"
diff --git a/test/unlock-pin b/test/unlock-pin
index 10b66265..61f47652 100755
--- a/test/unlock-pin
+++ b/test/unlock-pin
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import dbus
import sys