From d43308c5cc767d817ac8f77d38c6baf124de1b7c Mon Sep 17 00:00:00 2001 From: jaseg Date: Tue, 20 Jun 2023 14:07:03 +0200 Subject: Add twisted coil gen --- coil_gen.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'coil_gen.py') diff --git a/coil_gen.py b/coil_gen.py index 0c8d5ca..896ec1b 100644 --- a/coil_gen.py +++ b/coil_gen.py @@ -304,8 +304,9 @@ def generate(infile, outfile, polygon, start_angle, windings, trace_width, clear if clipboard: try: - print(f'Running {copy[0]}. Press Ctrl+C when you are done pasting.') - subprocess.run(copy, capture_output=True, text=True, check=True, input=fp.serialize()) + print(f'Running {copy[0]}.') + proc = subprocess.Popen(copy, stdin=subprocess.PIPE, text=True) + proc.communicate(fp.serialize()) except FileNotFoundError: print(f'Error: --clipboard requires the {copy[0]} and {paste[0]} utilities from {cliputil} to be installed.', file=sys.stderr) elif not outfile: -- cgit