python getpass实现密文实例详解
作者:ommph 时间:2021-06-25 20:29:17
getpass模块的使用:
在python中实现密码密文需要导入getpass模块,在python中要使用内置模块的话,需要使用import进行导入,比如import getpass 实现了导入模块
import getpass
username = input("username:")
password = getpass.getpass("password:")
print(username,password)
注意:getpass模块在pycharm中无法实现密文。如图
只有在解释器中执行。如图
来源:https://www.cnblogs.com/ommph/p/11376788.html
标签:python,getpass,密文
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
SQL大讲堂:如何了解SQL的执行频率
2009-09-05 09:40:00
Python实现自动清理电脑垃圾文件详解
2023-05-18 00:50:22
![](https://img.aspxhome.com/file/2023/7/90467_0s.png)
python pyinstaller 加载ui路径方法
2023-06-12 23:27:20
用正则表达式找出不包含连续字符串abc的单词
2010-03-02 20:28:00
Python协程原理全面分析
2022-10-02 01:43:43
用Python在Excel里画出蒙娜丽莎的方法示例
2023-12-18 02:59:21
![](https://img.aspxhome.com/file/2023/9/71359_0s.jpg)
Python制作当年第一款手机游戏-贪吃蛇游戏(练习)
2022-06-20 02:37:35
![](https://img.aspxhome.com/file/2023/0/79540_0s.gif)
编码问题引起的折腾
2009-07-03 12:43:00
PHP的mysqli_thread_id()函数讲解
2023-06-13 10:09:43
![](https://img.aspxhome.com/file/2023/3/55453_0s.png)
Python实现对一个函数应用多个装饰器的方法示例
2022-01-23 17:30:22
用js实现小球的自由移动代码
2023-08-23 02:57:29
![](https://img.aspxhome.com/file/2023/2/56182_0s.png)
Python实现基于权重的随机数2种方法
2022-10-13 03:25:40
pandas按某列降序的实现
2021-02-19 08:29:44
![](https://img.aspxhome.com/file/2023/0/86330_0s.png)
使用Javascript动态增加,删除表格
2008-02-03 19:15:00
![](https://img.aspxhome.com/file/UploadPic/20082/3/200823193227326s.gif)
关于pytorch处理类别不平衡的问题
2023-04-08 19:11:56
Python查找算法之插补查找算法的实现
2021-03-12 08:16:57
![](https://img.aspxhome.com/file/2023/7/82607_0s.png)
10个顶级Python实用库推荐
2023-08-27 17:41:46
![](https://img.aspxhome.com/file/2023/8/65518_0s.jpg)
python查找指定依赖包简介信息实现
2023-11-02 22:04:11
Python实现将数据框数据写入mongodb及mysql数据库的方法
2021-10-07 02:24:18
基于Python函数和变量名解析
2022-10-26 13:49:56
![](https://img.aspxhome.com/file/2023/7/76727_0s.jpg)