r/IPython • u/[deleted] • Mar 01 '15
getpass module will create inline text input widget in jupyter notebooks
Just thought I'd pass along that you can create a text input widget that you can use to obtain password from the user and the password will be masked or not echoed. What's nice now with jupyter notebooks, the text input widget will be rendered, inline within your notebook, whereas with prior versions of IPython notebooks, you would have to enter your password at the terminal console that you launched your IPython notebook server from.
Not sure how safe getpass is, but it is part of Python's standard library.
EDIT:
just do:
from getpass import getpass
pw = getpass(prompt='Enter your password: ')
8
Upvotes