Skip to content

Commit 43832fc

Browse files
committed
Replace double quotes with single quotes
1 parent fa5d84f commit 43832fc

6 files changed

Lines changed: 136 additions & 136 deletions

File tree

‎examples/chatty_client.py‎

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -10,93 +10,93 @@
1010
from __future__ import print_function # only needed for Python 2.x
1111
import jack
1212

13-
print("setting error/info functions")
13+
print('setting error/info functions')
1414

1515

1616
@jack.set_error_function
1717
def error(msg):
18-
print("Error:", msg)
18+
print('Error:', msg)
1919

2020

2121
@jack.set_info_function
2222
def info(msg):
23-
print("Info:", msg)
23+
print('Info:', msg)
2424

2525

26-
print("starting chatty client")
26+
print('starting chatty client')
2727

28-
client = jack.Client("Chatty-Client")
28+
client = jack.Client('Chatty-Client')
2929

3030
if client.status.server_started:
31-
print("JACK server was started")
31+
print('JACK server was started')
3232
else:
33-
print("JACK server was already running")
33+
print('JACK server was already running')
3434
if client.status.name_not_unique:
35-
print("unique client name generated:", client.name)
35+
print('unique client name generated:', client.name)
3636

3737

38-
print("registering callbacks")
38+
print('registering callbacks')
3939

4040

4141
@client.set_shutdown_callback
4242
def shutdown(status, reason):
43-
print("JACK shutdown!")
44-
print("status:", status)
45-
print("reason:", reason)
43+
print('JACK shutdown!')
44+
print('status:', status)
45+
print('reason:', reason)
4646

4747

4848
@client.set_freewheel_callback
4949
def freewheel(starting):
50-
print(["stopping", "starting"][starting], "freewheel mode")
50+
print(['stopping', 'starting'][starting], 'freewheel mode')
5151

5252

5353
@client.set_blocksize_callback
5454
def blocksize(blocksize):
55-
print("setting blocksize to", blocksize)
55+
print('setting blocksize to', blocksize)
5656

5757

5858
@client.set_samplerate_callback
5959
def samplerate(samplerate):
60-
print("setting samplerate to", samplerate)
60+
print('setting samplerate to', samplerate)
6161

6262

6363
@client.set_client_registration_callback
6464
def client_registration(name, register):
65-
print("client", repr(name), ["unregistered", "registered"][register])
65+
print('client', repr(name), ['unregistered', 'registered'][register])
6666

6767

6868
@client.set_port_registration_callback
6969
def port_registration(port, register):
70-
print(repr(port), ["unregistered", "registered"][register])
70+
print(repr(port), ['unregistered', 'registered'][register])
7171

7272

7373
@client.set_port_connect_callback
7474
def port_connect(a, b, connect):
75-
print(["disconnected", "connected"][connect], a, "and", b)
75+
print(['disconnected', 'connected'][connect], a, 'and', b)
7676

7777

7878
try:
7979
@client.set_port_rename_callback
8080
def port_rename(port, old, new):
81-
print("renamed", port, "from", repr(old), "to", repr(new))
81+
print('renamed', port, 'from', repr(old), 'to', repr(new))
8282
except AttributeError:
83-
print("Could not register port rename callback (not available on JACK1).")
83+
print('Could not register port rename callback (not available on JACK1).')
8484

8585

8686
@client.set_graph_order_callback
8787
def graph_order():
88-
print("graph order changed")
88+
print('graph order changed')
8989

9090

9191
@client.set_xrun_callback
9292
def xrun(delay):
93-
print("xrun; delay", delay, "microseconds")
93+
print('xrun; delay', delay, 'microseconds')
9494

9595

96-
print("activating JACK")
96+
print('activating JACK')
9797
with client:
98-
print("#" * 80)
99-
print("press Return to quit")
100-
print("#" * 80)
98+
print('#' * 80)
99+
print('press Return to quit')
100+
print('#' * 80)
101101
input()
102-
print("closing JACK")
102+
print('closing JACK')

‎examples/midi_chords.py‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515

1616
INTERVALS = 3, 7 # minor triad
1717

18-
client = jack.Client("MIDI-Chord-Generator")
19-
inport = client.midi_inports.register("input")
20-
outport = client.midi_outports.register("output")
18+
client = jack.Client('MIDI-Chord-Generator')
19+
inport = client.midi_inports.register('input')
20+
outport = client.midi_outports.register('output')
2121

2222

2323
@client.set_process_callback
@@ -34,7 +34,7 @@ def process(frames):
3434
outport.write_midi_event(offset, (status, pitch + i, vel))
3535

3636
with client:
37-
print("#" * 80)
38-
print("press Return to quit")
39-
print("#" * 80)
37+
print('#' * 80)
38+
print('press Return to quit')
39+
print('#' * 80)
4040
input()

‎examples/midi_monitor.py‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@
55
import jack
66
import binascii
77

8-
client = jack.Client("MIDI-Monitor")
9-
port = client.midi_inports.register("input")
8+
client = jack.Client('MIDI-Monitor')
9+
port = client.midi_inports.register('input')
1010

1111

1212
@client.set_process_callback
1313
def process(frames):
1414
for offset, data in port.incoming_midi_events():
15-
print("{0}: 0x{1}".format(client.last_frame_time + offset,
15+
print('{0}: 0x{1}'.format(client.last_frame_time + offset,
1616
binascii.hexlify(data).decode()))
1717

1818
with client:
19-
print("#" * 80)
20-
print("press Return to quit")
21-
print("#" * 80)
19+
print('#' * 80)
20+
print('press Return to quit')
21+
print('#' * 80)
2222
input()

‎examples/midi_sine.py‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@
3737
fs = None
3838
voices = {}
3939

40-
client = jack.Client("MIDI-Sine")
41-
midiport = client.midi_inports.register("midi_in")
42-
audioport = client.outports.register("audio_out")
40+
client = jack.Client('MIDI-Sine')
41+
midiport = client.midi_inports.register('midi_in')
42+
audioport = client.outports.register('audio_out')
4343
event = threading.Event()
4444

4545

@@ -134,13 +134,13 @@ def samplerate(samplerate):
134134

135135
@client.set_shutdown_callback
136136
def shutdown(status, reason):
137-
print("JACK shutdown:", reason, status)
137+
print('JACK shutdown:', reason, status)
138138
event.set()
139139

140140

141141
with client:
142-
print("Press Ctrl+C to stop")
142+
print('Press Ctrl+C to stop')
143143
try:
144144
event.wait()
145145
except KeyboardInterrupt:
146-
print("\nInterrupted by user")
146+
print('\nInterrupted by user')

‎examples/thru_client.py‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@
3434
client = jack.Client(clientname, servername=servername)
3535

3636
if client.status.server_started:
37-
print("JACK server started")
37+
print('JACK server started')
3838
if client.status.name_not_unique:
39-
print("unique name {0!r} assigned".format(client.name))
39+
print('unique name {0!r} assigned'.format(client.name))
4040

4141
event = threading.Event()
4242

@@ -51,16 +51,16 @@ def process(frames):
5151

5252
@client.set_shutdown_callback
5353
def shutdown(status, reason):
54-
print("JACK shutdown!")
55-
print("status:", status)
56-
print("reason:", reason)
54+
print('JACK shutdown!')
55+
print('status:', status)
56+
print('reason:', reason)
5757
event.set()
5858

5959

6060
# create two port pairs
6161
for number in 1, 2:
62-
client.inports.register("input_{0}".format(number))
63-
client.outports.register("output_{0}".format(number))
62+
client.inports.register('input_{0}'.format(number))
63+
client.outports.register('output_{0}'.format(number))
6464

6565
with client:
6666
# When entering this with-statement, client.activate() is called.
@@ -75,23 +75,23 @@ def shutdown(status, reason):
7575

7676
capture = client.get_ports(is_physical=True, is_output=True)
7777
if not capture:
78-
raise RuntimeError("No physical capture ports")
78+
raise RuntimeError('No physical capture ports')
7979

8080
for src, dest in zip(capture, client.inports):
8181
client.connect(src, dest)
8282

8383
playback = client.get_ports(is_physical=True, is_input=True)
8484
if not playback:
85-
raise RuntimeError("No physical playback ports")
85+
raise RuntimeError('No physical playback ports')
8686

8787
for src, dest in zip(client.outports, playback):
8888
client.connect(src, dest)
8989

90-
print("Press Ctrl+C to stop")
90+
print('Press Ctrl+C to stop')
9191
try:
9292
event.wait()
9393
except KeyboardInterrupt:
94-
print("\nInterrupted by user")
94+
print('\nInterrupted by user')
9595

9696
# When the above with-statement is left (either because the end of the
9797
# code block is reached, or because an exception was raised inside),

0 commit comments

Comments
 (0)