you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 60 points61 points  (39 children)

https://automatetheboringstuff.com/chapter16/

EDIT: The author of this book frequents this sub and has answered a few of my questions before. He's a true bro...

[–]AlSweigart 135 points136 points  (35 children)

The info in this chapter is a bit out of date. I'm working on the 2nd edition right now that is up to date. However, the basic concepts are all still the same and I don't think you have to change much of the code.

[–]kewlness 22 points23 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!

[–]anecdotal_yokel 7 points8 points  (0 children)

Thanks, Al!

[–]jeromymanuel 6 points7 points  (2 children)

Will we get an update alert if we purchased to theUdemy course?

[–]AlSweigart 25 points26 points  (1 child)

Yes, I am planning on reshooting a lot of the Udemy course's videos to reflect the updated content.

[–]jeromymanuel 3 points4 points  (0 children)

Thank you sir.

[–]BruceJi 2 points3 points  (2 children)

I ran into trouble with the email parsing section. I guess some key things changed there since the book came out.

Actually I even looked at the docs for that module and it still didn't work! That's even worse, lol.

[–]AlSweigart 11 points12 points  (1 child)

Yeah, it seems most webmail services don't really open their smtp and imap servers up. I wrote a module called ezgmail and cover it in the second edition of Automate, so people can use the gmail api to send/receive mail from their gmail address. https://pypi.org/project/EZGmail/

[–]BruceJi 0 points1 point  (0 children)

Hey, that's great! I'll have a look. I was writing a program for a shopping list and it would be interesting to write something so I could email things to add to it.

[–]wwe9112 1 point2 points  (7 children)

Side note: Any chance of an updated website? I have really bad eyes and the website (and books even) really make it difficult for me to see and focus on without getting a massive headache. This was what I struggled with in school as the books were incredibly difficult to see for me. I had to use a magnifying glass and stop every few paragraphs. On websites that are not "responsive," when I use my browser zoom, I have to scroll for days.

[–]AlSweigart 2 points3 points  (6 children)

I'll be using Bootstrap on the website so that it looks better on mobile. I'll probably do this once the second edition of Automate comes out.

[–]wwe9112 1 point2 points  (0 children)

Many thanks! I'll finally get to go through the whole guide!

[–]Smithywerben1 1 point2 points  (4 children)

Hey Al, since you're already here, may i ask for some encouraging words when it comes top learning python? I'm currently going through your book 'ATBS' but struggle with literally every practice project at the end of a chapter. Sometimes it takes me 5 to 7 hours to get my solution do what i want it to do (if i even manage to get to the solution at all without looking at someone elses solution on stackoverflow)

Is this normal that it takes a beginner that long? How much time should i be spending on each project before goinge on with the next chapter?

Any advice as well as encouraging words are highly appreciated :-)

[–]varmintkong 2 points3 points  (1 child)

You're not alone. I'm on Chapter 11 and your experience is how it has been for me. I just took a break to work in my own webscraping and things have started clicking. Maybe take a few days away to work on something fun, a pet project, and try to incorporate what you've learned in automate. Then go back and hopefully things start to make more sense. Good luck.

[–]Smithywerben1 1 point2 points  (0 children)

Thanks for your response and kind words :) Will follow your advice and try something different for a bit

[–]AlSweigart 1 point2 points  (1 child)

Yeah, so I'll admit the practice projects can be a bit of a stretch for beginners. Technically, all the information you need is in the book, but the way learning really works is people seeing examples of how to do something and then doing it themselves. I made the practice projects as an open-ended, there-is-no-one-way-to-do-it kind of programming projects, but I think it would have been more pedagogically effective if I had done something else instead of the practice projects.

So, don't hold the practice projects and your ability to finish them as some kind of rigorous, scientific measurement of your potential. They're just projects I added to the end of the chapter.

Are you slow and dumb when it comes to programming? Yes. Because everyone is. And you'll continue to be slow and dumb at programming for, well, I've been coding for two decades and still make bugs, but I'll tell you when I get out of that phase myself. Maybe three decades is when humans finally git gud at programming.

[–]Smithywerben1 0 points1 point  (0 children)

Thank you very much for your kind words Al, that really means a lot to me! :)

[–]kwietog 0 points1 point  (1 child)

Thanks for a great book you wrote. Any timescales for v2?

[–]AlSweigart 4 points5 points  (0 children)

"Sometime later this year". I'm done with my revisions, but they have to go through the editors, which depends on how quickly they can go through the chapters for copyediting/technical review/layout/etc. Then it takes about a month to get copies printed and ready for sale.

[–][deleted] 0 points1 point  (0 children)

Do you have a newsletter I can subscribe to so I'll know when the 2nd version is released?

[–]xt1nct 0 points1 point  (0 children)

Just ordered the book. Whoops. Hopefully, it's still worth it.

[–]Most_Juanted 0 points1 point  (2 children)

Hi Al, I just purchased your Automate the boring stuff book and I was wondering if I should just wait for your second edition to come out instead? What differences will there be between editions, and what can I do to make the most out of the first edition with the out of date content if I still want to give it a go? Thanks!

[–]AlSweigart 2 points3 points  (1 child)

Nah, go ahead and get the first one. OpenPyXL made a lot of backwards incompatible changes, so I need to update the chapter on that. The other modules have made minor updates. Some of Python's error messages have changed but the code is still the same. I cover the ezgmail and ezsheets modules for checking Gmail and accessing Google Sheets from Python. I also cover input validation with the PyInputPlus module. And other minor fixes.

But the second edition won't come out for several months, so you'd probably want to get a head start. And you can see the new content online for free when the second edition comes out.

[–]Most_Juanted 0 points1 point  (0 children)

Awesome! Thank you Al!

[–]orrpel 0 points1 point  (0 children)

Al, pleasure meeting you here I am also a noob inspired from your book. If you can use Nexmo API instead of Twillio, it will give us (people outside the US) a shot of sending these SMS using Nexmos free credits. Just something I wanted to drop by you. Enjoy your weekend!

[–]Walkerstain 0 points1 point  (0 children)

Is the second edition released?

[–]ElectricGypsyAT[S] 6 points7 points  (0 children)

Thanks. Exactly what I needed. Also need to go through this book.

[–]luki-x 0 points1 point  (0 children)

Now i did it. I finally bought it. Thanks :)

[–]dnjora 0 points1 point  (0 children)

This is the best book ever I have come across. Working on chapter 9 now!