Use pipeable.stdout instead of print.
This commit is contained in:
parent
a40dff9f49
commit
db2fab6628
2 changed files with 4 additions and 3 deletions
|
@ -5,13 +5,14 @@ import argparse
|
|||
import pyperclip
|
||||
import sys
|
||||
|
||||
from voussoirkit import pipeable
|
||||
|
||||
def clipboard_argparse(args):
|
||||
if args.output_file:
|
||||
open(args.output_file, 'w', encoding='utf-8').write(pyperclip.paste())
|
||||
else:
|
||||
text = pyperclip.paste()
|
||||
text = text.replace('\r', '')
|
||||
print(text)
|
||||
pipeable.stdout(text)
|
||||
|
||||
return 0
|
||||
|
||||
|
|
2
repr.py
2
repr.py
|
@ -1,4 +1,4 @@
|
|||
from voussoirkit import pipeable
|
||||
|
||||
for line in pipeable.go():
|
||||
print(repr(line))
|
||||
pipeable.stdout(repr(line))
|
||||
|
|
Loading…
Reference in a new issue