From 70cf20e1137cb56fd74eb12a4f2a6e42cbc861a7 Mon Sep 17 00:00:00 2001 From: Matthias Geier Date: Mon, 19 Dec 2016 10:05:04 +0100 Subject: Examples: Replace double quotes with single quotes --- examples/play_long_file.py | 2 +- examples/rec_unlimited.py | 6 +++--- examples/wire.py | 26 +++++++++++++------------- 3 files changed, 17 insertions(+), 17 deletions(-) (limited to 'examples') diff --git a/examples/play_long_file.py b/examples/play_long_file.py index 64eef52..cd16187 100755 --- a/examples/play_long_file.py +++ b/examples/play_long_file.py @@ -47,7 +47,7 @@ event = threading.Event() def callback(outdata, frames, time, status): assert frames == args.blocksize if status.output_underflow: - parser.error("An output underflow occurred: increase blocksize?") + parser.error('An output underflow occurred: increase blocksize?') raise sd.CallbackAbort try: data = q.get_nowait() diff --git a/examples/rec_unlimited.py b/examples/rec_unlimited.py index 15a9174..5ff32ff 100755 --- a/examples/rec_unlimited.py +++ b/examples/rec_unlimited.py @@ -63,9 +63,9 @@ try: channels=args.channels, subtype=args.subtype) as file: with sd.InputStream(samplerate=args.samplerate, device=args.device, channels=args.channels, callback=callback): - print("#" * 80) - print("press Ctrl+C to stop the recording") - print("#" * 80) + print('#' * 80) + print('press Ctrl+C to stop the recording') + print('#' * 80) while True: file.write(queue.get()) diff --git a/examples/wire.py b/examples/wire.py index a980d7f..ad9e3a5 100755 --- a/examples/wire.py +++ b/examples/wire.py @@ -16,16 +16,16 @@ def int_or_str(text): return text parser = argparse.ArgumentParser(description=__doc__) -parser.add_argument("-i", "--input-device", type=int_or_str, - help="input device ID or substring") -parser.add_argument("-o", "--output-device", type=int_or_str, - help="output device ID or substring") -parser.add_argument("-c", "--channels", type=int, default=2, - help="number of channels") -parser.add_argument("-t", "--dtype", help="audio data type") -parser.add_argument("-s", "--samplerate", type=float, help="sampling rate") -parser.add_argument("-b", "--blocksize", type=int, help="block size") -parser.add_argument("-l", "--latency", type=float, help="latency in seconds") +parser.add_argument('-i', '--input-device', type=int_or_str, + help='input device ID or substring') +parser.add_argument('-o', '--output-device', type=int_or_str, + help='output device ID or substring') +parser.add_argument('-c', '--channels', type=int, default=2, + help='number of channels') +parser.add_argument('-t', '--dtype', help='audio data type') +parser.add_argument('-s', '--samplerate', type=float, help='sampling rate') +parser.add_argument('-b', '--blocksize', type=int, help='block size') +parser.add_argument('-l', '--latency', type=float, help='latency in seconds') args = parser.parse_args() try: @@ -42,9 +42,9 @@ try: samplerate=args.samplerate, blocksize=args.blocksize, dtype=args.dtype, latency=args.latency, channels=args.channels, callback=callback): - print("#" * 80) - print("press Return to quit") - print("#" * 80) + print('#' * 80) + print('press Return to quit') + print('#' * 80) input() if cumulated_status: -- cgit v1.2.3