PowerShell wrapper to direct piped input to Python script
问题 I'm trying to write a little tool that will let me pipe command output to the clipboard. I've read through multiple answers on Stack Overflow, but they didn't work for me, because they didn't include piping, or because they didn't use a function, or they just threw errors (or maybe I just messed up). I threw up my hands with PowerShell and decided to go with Python. I created a Python script called copyToClipboard.py : import sys from Tkinter import Tk if sys.stdin.isatty() and len(sys.argv)