I've had a fantastic time writing books (Python Workout and Pandas Workout) for Manning. They do great work, and are incredibly patient with me. They have helped to make my books far better than they otherwise would have been. I have no doubt that O'Reilly does a similarly good job. (I don't publish with O'Reilly, but I do teach for them online, and have been impressed.)<p>That said: Writing a book is a long slog. It's hard and frustrating. And at the end of the process, you have an amazing feeling and some money -- definitely less than you would have gotten if you had done consulting during that time, though.<p>I do corporate Python training. Do companies hire me because I've written books? Not really. But it definitely adds to my credibility.<p>At the end of the day, I write because I enjoy explaining and teaching, knowing I'm helping people all over the world, and seeing my name on a book cover. If you're doing it for the money, you're almost certainly going to be disappointed. Knowing that I'm working with great professionals who share my goals and want to create the best possible product adds to my motivation.