password protect file

Peter Pearson ppearson at nowhere.invalid
Sun Jun 30 13:56:02 EDT 2013


On Sat, 29 Jun 2013 10:28:47 -0700 (PDT), gmsiders at gmail.com wrote:
> I was wondering if there was a couple of words or things i
> could add to the top of my python script to password
> protect it so that it asks user for the password and then
> after three tries it locks them out or says "access
> denied" and closes/ends the script but if they get it
> wright it proceeds on to the next line of the script total
> noob here any help appreciated

You can do this with just a couple lines of Python (and I'm
sure this group's experts can show you how better than I),
but more importantly, are you aware that doing this doesn't
actually make anything secure, unless you also take precautions
that are much more complicated than a few lines of Python?

If you frankly state that you're only after a kid-sister
level of security, readers might feel less conflicted about
helping.

-- 
To email me, substitute nowhere->spamcop, invalid->net.



More information about the Python-list mailing list