summaryrefslogtreecommitdiff
path: root/coil_gen.py
diff options
context:
space:
mode:
Diffstat (limited to 'coil_gen.py')
-rw-r--r--coil_gen.py5
1 files changed, 3 insertions, 2 deletions
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: