test: Convert to Python 3
authorMartin Pitt <martin.pitt@ubuntu.com>
Tue, 11 Mar 2014 16:39:22 +0000 (17:39 +0100)
committerDenis Kenzior <denkenz@gmail.com>
Wed, 12 Mar 2014 00:34:08 +0000 (19:34 -0500)
Change raw_input() to input() and unicode to str. This is *not*
compatible with Python 2. Update the hashbangs to run with Python 3.

94 files changed:
test/activate-context
test/answer-calls
test/backtrace
test/cancel-ussd
test/cdma-connman-disable
test/cdma-connman-enable
test/cdma-dial-number
test/cdma-hangup
test/cdma-list-call
test/cdma-set-credentials
test/change-pin
test/create-internet-context
test/create-mms-context
test/create-multiparty
test/deactivate-all
test/deactivate-context
test/dial-number
test/disable-call-forwarding
test/disable-gprs
test/disable-modem
test/display-icon
test/dundee-connect
test/dundee-disconnect
test/enable-cbs
test/enable-gprs
test/enable-modem
test/enter-pin
test/get-icon
test/get-operators
test/get-tech-preference
test/hangup-active
test/hangup-all
test/hangup-call
test/hangup-multiparty
test/hold-and-answer
test/initiate-ussd
test/list-calls
test/list-contexts
test/list-messages
test/list-modems
test/list-operators
test/lock-pin
test/lockdown-modem
test/monitor-dundee
test/monitor-ofono
test/offline-modem
test/online-modem
test/private-chat
test/process-context-settings
test/receive-sms
test/reject-calls
test/release-and-answer
test/release-and-swap
test/remove-contexts
test/reset-pin
test/scan-for-operators
test/send-sms
test/send-ussd
test/send-vcal
test/send-vcard
test/set-call-forwarding
test/set-cbs-topics
test/set-context-property
test/set-fast-dormancy
test/set-gsm-band
test/set-mic-volume
test/set-mms-details
test/set-msisdn
test/set-roaming-allowed
test/set-speaker-volume
test/set-tech-preference
test/set-tty
test/set-umts-band
test/set-use-sms-reports
test/swap-calls
test/test-advice-of-charge
test/test-call-barring
test/test-call-forwarding
test/test-call-settings
test/test-cbs
test/test-gnss
test/test-message-waiting
test/test-modem
test/test-network-registration
test/test-phonebook
test/test-push-notification
test/test-smart-messaging
test/test-sms
test/test-ss
test/test-ss-control-cb
test/test-ss-control-cf
test/test-ss-control-cs
test/test-stk-menu
test/unlock-pin

index 937b7dbfaa4ae4f08050369cc7f074d689816ceb..22ad1734885fb83b3dc639f2dfd9866a575ccb5d 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import sys
 import dbus
index 45ff08f8c4dba1cfc90cb6b9493f754783ce6a65..daa794b8b2b1ca590becc4c733eb03ee9673143e 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import dbus
 
index c6247090605a8dc904e1cc6e9b17410f136ed950..03c76327f2f8d89e7e7e6cd520faf4ddb249c094 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import os
 import re
index 1797f2607d3c48f81be7619076c502f59c21a0ee..e7559bab765ca98fc2633fc6442decf0954ef15f 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import sys
 import dbus
index 0ddc0cdda951321fb577572bf6cca6595dbc8b73..3adc14d1b1bef06c77c5dabcc739268dde7cb5e8 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import dbus
 import sys
index a3cca01708beecc7a7c5170c3f003fc3c3ad9f41..ac16a2da0d0c3b01d551466a29e4c812159204bb 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import dbus
 import sys
index 9cdfb24cc572d8323f672906be6f1554cfa3524e..683431e625a9f85d5e5108bc8537a7b407741a2f 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import sys
 import dbus
index 493ece419a1cb9fc332071d9899369431b62000c..41ffa60cc10529bad2fcbfa70d3974e8e3a12c37 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import sys
 import dbus
index 5d36a699c04dff81273fa202b4c495ef53aa8eda..b132353a7ddd877fe5f119adf4267f6fcc53c93d 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import dbus
 
index a286b0e859d9c780cf783d6ba092a1c867085472..a60c86ed03ed9636013023ee3649fce167a38ec4 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import dbus
 import sys
index 000ce53505bb6f92df17e96ce93ee6f86e127532..301c6ceb9cff8732bc7a65c32931667ad0298042 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import dbus
 import sys
index efd09986c2ecaf220e8db697a7c7b7dc1214c52d..1089053cebbd198fe1d872e6163cd23776caa6ad 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import sys
 import dbus
index e5be08de521450ef4917088c59f6a0e798c2f130..598336f519359b14574ef357db933a931c1f1358 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import sys
 import dbus
index 44a78f715b41bd55d597b8d6da22d7dcb9fee435..b6395e8e5ad046c0f8c0f46f8c9a5b18f9c3d3d9 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import sys
 import dbus
index 427009e8e81ac5325312478712688f2918670e9e..5aa858714f2d12913a6d5c98b00d387f93da29c3 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import sys
 import dbus
index 848bcbd6a864f3b67f4169480a6f49b894f600f5..bc2ffd31a0b2829c0ce76eebcf74387608ac132e 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import sys
 import dbus
index ee674d98239509f6932039b1e6e61f774d471706..fe5adad3c90a69dde64d1918a85528f9065024e3 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import sys
 import dbus
index 36098162440de342ebc14dcc9621fa268338a7ea..811e4fa72aafb989249a803a767d3b44439c2308 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import sys
 from gi.repository import GLib
index c6c40a5e3f578945d7653b67453b62f79a4e6d2b..61ce216c4f14834806f9a6851a2b4cc80ac2d71a 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import dbus
 import sys
index ca8c8d89c66ffde9eff9b7635b5f7995c481547f..6fba8570e8bd4e42d6ed28fb7c1d50aff3313408 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import dbus
 import sys
index 753d14d849afc631d4f218df932b77a17995765f..ac4081812506a3c06e2424029869299187051ca7 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import sys
 import dbus
index a23ce5f6b9d8dd6c23a093a036e8be73945876ee..77b16b82fe4ea247af753f483e6655cdcbfc78a2 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import dbus
 import sys
index 05403dd09e96aeb88a4b18c7feada87107bd40f0..4c3f048e72d95cee77f67dcc0435eda5fd3d140f 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import dbus
 import sys
index c08bf2b306103749eeb738a07238e3ed34011b58..4a8bf6654ead6cdf65a2feb8d2cafe0a58593b5a 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import dbus
 import sys
index 8664891f33a7ee7aa3041ad45ec2900d6dec79ee..68d5ef09f016bfe92eba74f97982999c58e9b51a 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import dbus
 import sys
index dfaaaa8558d9d39e64415d57c0ae3f84e2eaafe9..fc5958a6493271cd93a49a415f129422e4c89c8a 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import dbus
 import sys
index c6ee669cff3e7bb2fcbecaf430fa04939df45dc5..95563632b87d686816ac8cbabd27e140e05c999b 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import dbus
 import sys
index fdaaee7f1c6ef743b6ff2032cbf6e1e683c41d7b..5569a332080633d6dd01a23d9c1a30d6a8415ea1 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import dbus
 import sys
index 62354c5a94ae5d02a5d0317fda5e1095a59d0770..0f35c80a59bc7ecc2b6c87ce17200eb9880ae6a6 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import dbus
 import sys
index 77d20d011062e1367e2f2ddb388855986ee2d17a..7ba6365e5964a3ca0020ffeb5b0087dbad45ca4a 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import dbus, sys
 
index 1dd85a65fcd0291bf98692be0e3acbd665ee4cc2..8e65bc46d9c524463171bc4766850026fc9af574 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import sys
 import dbus
index 32933db09f3eac097a734308483f02b98be8b838..3a0138db4a12cea5570fb274992ade45102fbf77 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import sys
 import dbus
index 447020c0f509e71180ca3db6315644dc8d34b20c..5a2de20ed22aec1c5500435f66558bd83ce48885 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import sys
 import dbus
index 48fe34281b54b8b945808d079443822f74e7ac16..24751c3a4269a427c94fa80d10492c80b4cfc85e 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import sys
 import dbus
index 2c47e27578050323f976be235b12cece7831b484..da3be577223f217a6bcca04bc5946d37dd74aa4c 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import sys
 import dbus
index d7022f1d6d1aa5ffc68ae61358af265a1d2608b6..faf50d0f2a1a23b72aa2fb5b4e554fc3312c09bd 100755 (executable)
@@ -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)
 
index 08668c6506ce7f11aa6e358e052eac10280dd3bc..f3ee99199fc8819eb905186fde221117b5f80f28 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import dbus
 
index f0d409426caa1c20f0e7a573be700cc73b76e777..78278cacd1f0f51dd9420a86f96a40c508e184a3 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import dbus
 
index cfccbea8e776be14d59b7125cd9ff249ff5a5c7b..9f5bce34dbdc465c6b12bf3bd57f68f799d56408 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import dbus
 
index ed66124fb38e5381c18df662f9f52f5155380a80..b9f510a84287de77c55de613a22692098f69b7e8 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import dbus
 
index 349bf419a47d280df5c705799726c6664c07f392..064c4e34c369f86ee9ec0436e7709f069d6c9431 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import dbus
 import sys
index 5579735e8d0e1fdf8858d57c9676a4e5dc3508ff..96ea9c226721617e0a3c269724a00579b4875b99 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import dbus
 import sys
index 781abb69b87a3235143d3351ea11a19a7ca271de..4e04205a1672fec59e61c21ea1a73024c517fada 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import dbus
 import sys
index e68488aa73a5684e5610b282355fe4df8f5f5edc..5282a938266987822b37f58453f8a910567c602c 100755 (executable)
@@ -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,
index bd3161715809a7984825396535afe4a6c8ba7ce7..8830757e40637ca3a5166d573b6063dea491d85f 100755 (executable)
@@ -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,
index ea1f52230fd683621802cab246b86692da15117e..e8c043a66cb028d28319e6166bc0475298f70d90 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import dbus, sys
 
index 310ed7dfe3c1edfad3ce2285a2873e7c3a7f5c67..029c4a5a22bb24d22189c14d6282b9bdcbf2d368 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import dbus, sys
 
index 254522e98988ba2da1d9edd52a493665196f1b9c..17d17d0b8596dbb124e60ce7df80000f70b82d75 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import sys
 import dbus
index 0f058b2ae0534aec3214f8caeb051df42bd60bba..8a3ecfa70a6903c9fe56b2cd64ec3fcde1596099 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import os
 import dbus
index c23eb1460aa7de5f0e63723c0b8c20893c362dbd..a0c6915042ea199bf207cc4f15ffb68984d27cf4 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 from gi.repository import GLib
 
index 9edf1fffaa7a6db30408628bbde8f9a4f99d5616..71b243eecdff5ab9b5b9d00fac5d3638e39bb566 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import dbus
 
index ef860fc33381b5766da3f8f7480276c077bb6338..62eaa79c5527f2270864d2a2435a13b4fdcd3f7c 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import dbus
 
index 2748f207884f5d86df590094556488488b94337b..b4c0af1d015817b1eb3f674c5ecbf366ab5bf5e5 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import dbus
 
index c5082cb332894e4aa33d414165ccc0eab8576cef..b54184e69a755dd0045319ed4e581922b1d40274 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import dbus
 
index b429254e67eb909574f2568663b826c6f9559d6b..3fbd1263c8ba66d07786fab6785b4da92c9f8ec3 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import dbus
 import sys
index 749c7106f25691a964718cb3111b5d42c9afb393..b4fc05e2ba5fb72d9e92aa4ee9ef638900e78058 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import dbus
 import sys
index e06444dbfa830a37e0e52888c25d93b84cd45cfd..98808aafc08d56598ebefa95fd40ce741ddb493b 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import sys
 import dbus
index e58588363c0838e2a8d5eb886e8698cc8dcc4210..a20e0987edc1fedc09792cf3f1915b7e4ee840e5 100755 (executable)
@@ -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))
 
index 7f8272bed3abbef46132474c41f3c75e7fd98d65..566daef989b17d97f361de2ce3a3556f4b23a025 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import sys
 import dbus
index 250b36feeca962ca1c2c77982aca5e37d9b8a8ab..4dedf511b766fa8b3420a8fb9640481f83654c1d 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import sys
 import dbus
index 9fd358be1452f34fe8706cef8413d1613973cea7..49d1ce0d98556d9a9060a5fdc4c7670b65b9abd9 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import sys
 from gi.repository import GLib
index 78d6d449b7e6d7780ad290391d92fd9952772cab..db95e169fea733d2c4d97b3b4da3a6c8afe10c5e 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import dbus
 import sys
index 64a6fb8740af0a083fc190a675cd2c29ef4ab1e1..5ff7a677a0995bb385d8a87887d74a322b850b45 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import sys
 import dbus
index 7bf77155faabe3198c2cbb25890627051981b68a..ef77bcdaa5e99b6c3a68c31a09bde1f5d8b9eb04 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import dbus
 import sys
index 3c17c108b46a38ceb300c0316719d6e1e315a0a7..b37bcb57f95e045f780c3c0cc6359de8e3333d5c 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import dbus
 import sys
index e0bff4949fafd418304b53eba158c860c537eec2..cd6c73faa6f37da727e0d0cb431fd91bc0d513ad 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import sys
 import dbus
index d2d08386dbd575ccf15f40aee18ecd9f38bb73ac..6ee59face21be107c1aa1626d8853ebb2f36fba3 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import sys
 import dbus
index 01f284dd0f6fd0f79261ad28660523e8947e1c74..b5fe8194aee5627efdf6acf5b6838923813eced5 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import dbus
 import sys
index 9e3e0580ae00725fbc76a47035300aa4215ea44c..698c8b6abb1b1aea4c29d412f333a01e8466c43e 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import sys
 import dbus
index 7962f39c710dad65f30e0da03beca72198f73333..6d4e3019b5c83d63f96cfcfd1e01b1cbc2c515e7 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import sys
 import dbus
index 2666cbd1ec89254fd43381930c25319dbe31ab88..b549abcc50d006867bef2774ba24bb97e30cfcc0 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import dbus
 import sys
index 53d6b99547beceda88a6d9eeff5b985893dbbfe3..eed1fbafa72adc5fa76a933b180611580422f967 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import dbus
 import sys
index c1e6448e7db66f282e768e55cbdcc01f4544fc0a..0bae5c453686214690acc7a579d41bbbc68a69a9 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import dbus
 import sys
index a4efe4f274a83929444b5420946f976c5d41e6f9..288d4e167a6e5eb6b67e21206f31cfcbb6dac2fd 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import dbus
 import sys
index eeb257b66e74e985ef077794bd6886908a43e6cc..018a8d3757365d85e0dfb55fe04f9d3cc4f87304 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import sys
 import dbus
index 0f1f57ff7436c8cd1a023b1d1e8461d3709c84fd..6e87e61a6636812ec8227d89af393d5911af7b91 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 from gi.repository import GLib
 import sys
index be4ab575505e8c87be87135305ea211ae865a978..eedb69ff0f3dc74f0e48d190fec843bae22aeda2 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 from gi.repository import GLib
 import sys
index 01a7294174e233a18cfcc39c46d3a034fc13b6f0..5db84d77ae5bf95bfbdaa0ab8a58aa2b43dd50a6 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 from gi.repository import GLib
 
index 5d7ee49e6d7d1d6dd8fc8022cf1ef9d7db3f6744..435594c91ebdcc6544c9f3e284a6284df3598afc 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 from gi.repository import GLib
 
index 13cdd80a51642633889a201b299a54209c47024c..a5cec065b5c2dc6a0333622e3124772cde2ba946 100755 (executable)
@@ -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] == '-':
index aa0b160cd5c8450841e90bff1d62ea5454feeb47..6ae64dbd918b5aa008cc45d8d2bed8155cbe289a 100755 (executable)
@@ -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")
index b93fbf396a94b924bbece71488055067ca7a4535..432862ec81e9df26fee66577410fe578b0b00c52 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 from gi.repository import GLib
 import sys
index 29dbf14af27faced38339fc77345075c2371d4f5..aa38b1fc77a95c47762fb2e64f4bdf4ae885c179 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 from gi.repository import GLib
 
index c5ad5864462206a3ae000d6542ae710be932d2e4..68b434765f0a8d07ce076ba0f1450a913a32666b 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 from gi.repository import GLib
 import sys
index 116fd4f1142a822e60a4e7f0ab853b29aec3fac6..42646d338242d26f544cbdea6932ec5065966702 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import dbus, sys
 
index ecc6afbf745c2cee2fd4f46cb9fc0c78c26fecdd..d972ad3f603a8d80e20a485b1d8ef109f0e064df 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 from gi.repository import GLib
 
index 188ac1eea535a50aef6ad007c1bc4e9feaa11d5e..f22efd25924807787ebe798b7cca38a07136c620 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 from gi.repository import GLib
 
index 49935e11c3171f41f727a75a5e7661de7c7e8e44..30ac651cd87fabce4ee72656109526163a5dd5b8 100755 (executable)
@@ -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]"))
index 2c80806e3d51cc496bd0a15b720b0cd7ff6933e6..4cd873225a0bbbdca84c952dbddada7588c2417d 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import sys
 import dbus
index 86bac9b05c6fccdbc37ab6f2d8f42b753d7e4c84..ddae6d3e4ac13116138b6bba9b5e0ee91d26e9ff 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 from gi.repository import GLib
 
index d30bf4f8792497f48c47dfe092458dc47f2a1c50..095eb5d984e22bb6c0f0e5bd8804dc9044f7c163 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 from gi.repository import GLib
 
index e0ed1d1aea80f6f8664393b9a0f1064d8969482e..818047416831d5e6126b31e3680e0ff2846dc2da 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 from gi.repository import GLib
 
index e76f292211d883c354e7c99a0d306f0bbcc98054..9ef92a1a53befe2cd4875e9f97f4e63b59f3f2b9 100755 (executable)
@@ -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"
index 10b66265f6735c576f7f11f4fc3c4aef214da706..61f47652f9249bd0ccf3c2fd1679c0efa7ef74ff 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import dbus
 import sys