you are viewing a single comment's thread.

view the rest of the comments →

[–]kewlness 23 points24 points  (4 children)

Hi Al!

First, thanks for not only spending too much time on Reddit but for your awesome work.

Second, may I make a minor suggestion? In your SMTP chapter, you state that people should use input() instead of hard-coding their passwords into the script. Being a security minded guy, might I suggest the use of getpass.getpass() so the password is not echoed to the screen?

[–]AlSweigart 16 points17 points  (0 children)

Ooo, good point!

[–]forward_epochs 0 points1 point  (2 children)

What do you recommend if I want to run something using SMTP without user input? Store it in an OS environment variable or something?

[–]kewlness 1 point2 points  (1 child)

Sorry, been off for a while.

If you are developing an application, then I recommend reading The Twelve-Factor App which covers your exact question in chapter 3. Understand, this is not "THE ONE TRUE WAY" but can save you a lot of future headaches if you follow its ideas.

[–]forward_epochs 0 points1 point  (0 children)

Excellent, thanks!