A "Best of the Best Practices" (BOBP) guide to developing in Python.
- "Build tools for others that you want to be built for you." - Kenneth Reitz
- "Simplicity is alway better than functionality." - Pieter Hintjens
| """Script to download free O'Reilly ebooks.""" | |
| import asyncio | |
| import os | |
| import re | |
| import sys | |
| import aiohttp | |
| filename_matcher = re.compile(r'http://www.oreilly.com/(.*)/free/(.*).csp') | |
| session = None |
| #!/usr/bin/env python | |
| from PyQt4 import QtGui, QtCore | |
| from PyQt4.QtGui import QApplication, QWidget, QVBoxLayout, QPushButton | |
| from functools import partial | |
| from collections import OrderedDict |
Here are a list of headless browsers that I know about:
| # Something in lines of http://stackoverflow.com/questions/348630/how-can-i-download-all-emails-with-attachments-from-gmail | |
| # Make sure you have IMAP enabled in your gmail settings. | |
| # Right now it won't download same file name twice even if their contents are different. | |
| import email | |
| import getpass, imaplib | |
| import os | |
| import sys | |
| detach_dir = '.' |