简体   繁体   English

使用Asterisk输出mask终端,但仍然能够复制并粘贴原始值?

[英]mask terminal output with Asterisk, but still be able to copy and paste the original value?

I have been searching for quite some time, trying to find how to mask terminal OUTPUT. 我已经搜索了很长时间,试图找到如何屏蔽终端输出的方法。

example: print(password) terminal: 示例:print(password)终端:


but still be able to copy and paste the password value. 但仍然能够复制并粘贴密码值。

There doesn't seem to be an answer to this, i have asked around :( 我没有问这个问题,似乎没有答案。

I worked around this problem. 我解决了这个问题。 the goal was to be able to put the password in the clipboard. 目的是能够将密码放入剪贴板。 so i used pyperclip to do it :) 所以我用pyperclip来做:)

hope it helps someone 希望对别人有帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM