summaryrefslogtreecommitdiffstats
path: root/dcoppython/test
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2023-01-10 18:50:57 +0900
committerSlávek Banko <slavek.banko@axis.cz>2023-01-13 03:28:05 +0100
commitd85bd77116b2cf7e7565a0905b53ff0fa2a5b50e (patch)
tree4a50744dcf8fbfeee8098646bb75332b7e1bfaec /dcoppython/test
parent3b188e184dc679e04975fbc2b572287fdcff0cca (diff)
downloadtdebindings-d85bd77116b2cf7e7565a0905b53ff0fa2a5b50e.tar.gz
tdebindings-d85bd77116b2cf7e7565a0905b53ff0fa2a5b50e.zip
Drop support for python2.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'dcoppython/test')
-rwxr-xr-xdcoppython/test/automate_presentation.py6
-rw-r--r--dcoppython/test/dcopserver/gen.py4
-rw-r--r--dcoppython/test/server.py2
-rw-r--r--dcoppython/test/signal.py4
-rw-r--r--dcoppython/test/test.py10
-rw-r--r--dcoppython/test/test2.py26
-rw-r--r--dcoppython/test/test3.py4
7 files changed, 28 insertions, 28 deletions
diff --git a/dcoppython/test/automate_presentation.py b/dcoppython/test/automate_presentation.py
index 0c75e108..a1833d2e 100755
--- a/dcoppython/test/automate_presentation.py
+++ b/dcoppython/test/automate_presentation.py
@@ -7,14 +7,14 @@ import pydcop
app = pydcop.anyAppCalled( "kpresenter" )
-if not app: raise RuntimeError, "Couldn't find a running KPresenter"
+if not app: raise RuntimeError("Couldn't find a running KPresenter")
doc = app.KoApplicationIface.getDocuments()[0]
view = doc.view(0)
startAction = view.action( "screen_start" )
-print "Starting Presentation %s" % doc.url()
+print("Starting Presentation %s" % doc.url())
startAction.activate()
@@ -27,4 +27,4 @@ while startAction.enabled() == 0:
act.activate()
view.screenStop()
-print "Presentation finished."
+print("Presentation finished.")
diff --git a/dcoppython/test/dcopserver/gen.py b/dcoppython/test/dcopserver/gen.py
index 4d1b8ff2..f0c952e5 100644
--- a/dcoppython/test/dcopserver/gen.py
+++ b/dcoppython/test/dcopserver/gen.py
@@ -7,7 +7,7 @@ inc_exceptions = {'TQDate': None, 'TQTime': None, 'KURL' : 'kurl'}
iface_inc_list = ['dcopobject']
iface_inc_list += [ t.lower() for t in type_list if t[0]=='Q' and t not in inc_exceptions ]
-iface_inc_list += inc_exceptions.values()
+iface_inc_list += list(inc_exceptions.values())
iface_inc_1 = ['class DCOPDemoIface : virtual public DCOPObject {',
' K_DCOP',
@@ -39,7 +39,7 @@ files = {'tdedcoptest_iface.h': iface_inc,
'cpp_inc.h': cpp_inc
}
-for (fname,data) in files.items():
+for (fname,data) in list(files.items()):
outf = file(fname,'w')
for d in data:
outf.write(d+'\n')
diff --git a/dcoppython/test/server.py b/dcoppython/test/server.py
index 957f6d94..7118effb 100644
--- a/dcoppython/test/server.py
+++ b/dcoppython/test/server.py
@@ -36,7 +36,7 @@ class ParrotObject(pydcop.DCOPServerObject):
appid = pydcop.registerAs('petshop')
-print "Server: %s starting" % appid
+print("Server: %s starting" % appid)
parrot = ParrotObject()
another_parrot = ParrotObject('polly')
diff --git a/dcoppython/test/signal.py b/dcoppython/test/signal.py
index 72aa1385..47d4038c 100644
--- a/dcoppython/test/signal.py
+++ b/dcoppython/test/signal.py
@@ -19,10 +19,10 @@ class MyObject(pydcop.DCOPServerObject):
self.setMethods( [('void test(TQString)', self.test)])
def test(self, data):
- print "New Weather for " + data
+ print("New Weather for " + data)
appid = pydcop.registerAs('dcopSignalTest')
-print "Server: %s starting" % appid
+print("Server: %s starting" % appid)
pytest = MyObject()
diff --git a/dcoppython/test/test.py b/dcoppython/test/test.py
index 5ead172a..fa04a2e0 100644
--- a/dcoppython/test/test.py
+++ b/dcoppython/test/test.py
@@ -4,12 +4,12 @@ import pydcop
#res = pcop.dcop_call( "kspread", "default", "getDocuments", () )
res = pydcop.anyAppCalled("kspread").default.getDocuments()
-print res
-print res[0].appname
-print res[0].name
+print(res)
+print(res[0].appname)
+print(res[0].name)
m = res[0].map()
-print m.tableNames()
+print(m.tableNames())
-print "done"
+print("done")
diff --git a/dcoppython/test/test2.py b/dcoppython/test/test2.py
index 1a56f917..36456848 100644
--- a/dcoppython/test/test2.py
+++ b/dcoppython/test/test2.py
@@ -6,23 +6,23 @@ app = pydcop.anyAppCalled( "kspread" );
res = app.default.getDocuments()
-print res
-print res[0].appname
-print res[0].name
+print(res)
+print(res[0].appname)
+print(res[0].name)
m = res[0].map()
-print m.tableNames()
+print(m.tableNames())
x = m.table('Sheet2')
if x:
- print x
- print "===================="
- print x._name
- print "===================="
- print x._name()
- print "===================="
-else: print "Could not find sheet called Sheet2"
-
-print "done"
+ print(x)
+ print("====================")
+ print(x._name)
+ print("====================")
+ print(x._name())
+ print("====================")
+else: print("Could not find sheet called Sheet2")
+
+print("done")
diff --git a/dcoppython/test/test3.py b/dcoppython/test/test3.py
index aa13ed8b..69072c66 100644
--- a/dcoppython/test/test3.py
+++ b/dcoppython/test/test3.py
@@ -9,6 +9,6 @@ table = app.default.getViews()[0]
table.setSelection( ( 2, 2, 4, 6 ) )
table.setSelectionBgColor( (100, 100, 240) )
-print rect
+print(rect)
-print "done"
+print("done")