[redirecting to python-ideas] On Sat, Feb 6, 2010 at 4:08 PM, Tarek Ziadé <ziade.ta...@gmail.com> wrote: > Hello, > > I would like to propose a small change in the getpass module so it's > able to get passwords from keyrings (like KWallet, Keychain, etc) > > The idea is to provide a getpass.cfg configuration file where people > can provide the name of a function to use when getpass is called. > Then third-party projects can implement this function. For example the > Python Keyring library.[1] could be installed and configured to be > used by people that wants getpass calls to be handled by this tool. > > That's a backward compatible change, and it avoids adding any new > module in the stdlib. Plus, it offers a greatly improved getpass > module with no risks for the stdlib stability : it becomes a reference > implementation with an interface for third-party implementers. > > A prototype is here : http://bitbucket.org/tarek/getpass/ (work in > progress but you can get the idea) > > [1] http://pypi.python.org/pypi/keyring
Don't you usually have to tell the keyring which password to retrieve? The signature for getpass() doesn't have enough info for that. I'm not sure that not adding a new module to the stdlib is a sufficient reason to foist the new semantics on an old function. -- --Guido van Rossum (python.org/~guido) _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com