keyring looks like a nice cross-platform Python module for storing encrypted passwords using platform appropriate mechanisms.
The Python keyring library provides an easy way to access the system keyring service from python. It can be used in any application that needs safe password storage.