Debian Codegraph @

debian/patches/python3.diff

raw
1 diff --git a/scripts/Xspice b/scripts/Xspice
2 index 927dcb1..78d0794 100755
3 --- a/scripts/Xspice
4 +++ b/scripts/Xspice
5 @@ -1,4 +1,4 @@
6 -#!/usr/bin/python
7 +#!/usr/bin/python3
8
9 """
10 Xspice
11 diff --git a/tests/xspice_audio_test.py b/tests/xspice_audio_test.py
12 index 455c1aa..786028c 100755
13 --- a/tests/xspice_audio_test.py
14 +++ b/tests/xspice_audio_test.py
15 @@ -1,4 +1,4 @@
16 -#!/usr/bin/python
17 +#!/usr/bin/python3
18
19 from time import sleep
20 from xspice_audio_test_helper import produce_audio
21 diff --git a/tests/xspice_audio_test_helper.py b/tests/xspice_audio_test_helper.py
22 index fbe3a54..14dacc3 100755
23 --- a/tests/xspice_audio_test_helper.py
24 +++ b/tests/xspice_audio_test_helper.py
25 @@ -1,4 +1,4 @@
26 -#!/usr/bin/python
27 +#!/usr/bin/python3
28 # coding: utf-8
29 import os
30 import sys
31 @@ -7,12 +7,12 @@ from math import sin, pi
32
33 def produce_audio(basedir):
34 filename = os.path.join(basedir, 'testaudio')
35 - os.system(u'mkfifo %s' % filename)
36 + os.system('mkfifo %s' % filename)
37 if not os.path.exists(basedir):
38 - print "missing fifo dir %s" % repr(basedir)
39 + print ("missing fifo dir %s" % repr(basedir))
40 f=open(filename,'w')
41 singen = lambda f: lambda t: (int(min(32767, 32768*sin(t*f/1000.0*pi))), int(min(32767, 32768*sin(t*f/1000.0*pi))))
42 - f.write(''.join( struct.pack('hh', *singen(40)(t)) for t in xrange(44100) ) )
43 + f.write(''.join( struct.pack('hh', *singen(40)(t)) for t in range(44100) ) )
44 os.unlink(filename)
45
46 if __name__ == '__main__':
47 diff --git a/tests/xspice_util.py b/tests/xspice_util.py
48 index 409a0fc..8e00add 100755
49 --- a/tests/xspice_util.py
50 +++ b/tests/xspice_util.py
51 @@ -1,4 +1,4 @@
52 -#!/usr/bin/python
53 +#!/usr/bin/python3
54
55 import os
56 from time import sleep
57 @@ -15,15 +15,15 @@ class Process(object):
58 @classmethod
59 def atexit(clazz):
60 for p in reversed(clazz.processes):
61 - print "child %s" % p.pid
62 + print ("child %s" % p.pid)
63 if False:
64 slp = subprocess.Popen(['/usr/bin/sleep', '10000'])
65 - print "wait on %d" % slp.pid
66 + print ("wait on %d" % slp.pid)
67 slp.wait()
68 if len(clazz.processes) == 0:
69 return
70 for p in reversed(clazz.processes):
71 - print "kill %s" % p.pid
72 + print ("kill %s" % p.pid)
73 try:
74 p.kill()
75 except:
76 @@ -33,7 +33,7 @@ class Process(object):
77 sleep(1)
78 for p in reversed(clazz.processes):
79 if not p.poll():
80 - print "terminate %s" % p.pid
81 + print ("terminate %s" % p.pid)
82 try:
83 p.terminate()
84 except: