Beware of a little, tiny particular. Python does not allow direct memory management.
Python objects, and then strings and passwords, are garbage collected automatically. There is no way (known to the author) to clean passwords safely. So might happen that other programs are able to see the left passwords in they dirty (not initialized) memory.
If the user cannot live with this limitation, he is better to change module or language.