Python is my current programming language of choice for most endeavors (even if only for prototyping). I am, however, not shy of using something else if it is better suited for the task.
It is also one of the main contributors to my occasional rants on the utter lack of an universal system scripting language.
My Stuff:
| Yaki | my current never-ending opus. |
| MailArchive | a quick hack to file web pages as MIME compliant e-mail messages. |
| IMAP Backup | another quick hack that apparently filled a long-standing need. |
| Growl native protocol implementation | this spawned numerous variants, including a proxy. |
| PicoRendezvous.py | a minimalist (and dumb) Bonjour / Rendezvous client. |
| PNGCanvas | a native Python PNG creation module. |
| PicoStats | a minimalist Apache log parser. |
Stuff I Help Out With:
- The Python Grimoire, which I converted into TiddlyWiki format
- newspipe, which I used daily for a couple of years and occasionally contributed to.
- Snakelets, the runtime for Yaki
Testing Aids:
- Testosterone, a testing framework with a great screencast
- Pycallgraph, which can generate a program flow graph via Graphviz.
Resources:
Mac OS X specific Stuff:
- Using Python with Quartz 2D on Mac OS X – an intro to the developer samples that have shipped with Xcode for a good while now
- Python Metadata Importer – for Spotlight
- BundleBuilder – to build standalone Mac OS X OS X app bundles
Windows:
Libraries:
| Category | Link | Notes |
|---|---|---|
| Console | plumbum | Another command wrapper, with SSH support. |
| pbs | A nice, simple and consistent generic command wrapper. | |
| Clint | A great module for developing CLI applications. | |
| Littleworkers | Parallel job management without the hassles. | |
| Colorama | Making ANSI color sequences work across platforms (see also this gist). | |
| Networking | pyapns | An Apple Push Notification Service provider based on Twisted. |
| gunicorn | A WSGI server for UNIX that supports a number of different worker daemons and is highly customizable. | |
| uwsgi | A C application container that speaks WSGI (and seems seriously kick-ass). | |
| msnlib | An MSN protocol implementation | |
| ircutils | A relatively modern IRC framework that uses asyncore |
|
| Python smtplib progress indication | Might come in useful some day. | |
| RPyC | an awesome RPC library | |
| Eventlet | Amazing event-oriented framework | |
| dpkt | packet creation and parsers | |
| Pcapy | a packet manipulation library | |
| Tftpy | a pure Python TFTP library, useful for implementing UDP file transfer testbeds. | |
| ftputil | a high-level interface to the ftplib module |
|
| telnetscript | a simple module to do scripted telnet sessions. | |
| FAPWS | a very fast asynchronous web server with a small codebase. | |
| simple non-blocking HTTP server | another simple server. | |
| PuSSH | SSH wrapper. | |
| POP | a POP3 class with neat semantics. | |
| PyRendezvous | neat little Bonjour module I use a lot. | |
| IPy | an IP address manipulation library. | |
| GUI Stuff | kivy | A sophisticated UI/UX library with Android support |
| pyglet | a cross-platform windowing and multimedia library with OpenGL support | |
| PythonCard | A bit basic, but interesting. | |
| urwid | A curses based library for building console UIs | |
| winGuiAuto.py | for Windows automation. | |
| VPython | 3D OpenGL libraries for quick visualization. | |
| IMAPClient | An IMAP wrapper library | |
| Data formats | biplist | A library that can manage Mac binary .plist files |
| xlwt | a library to parse Excel documents (cheatsheet). | |
| Unicode | Unidecode | Does character transliterations. |
| Interpreters | Skulpt | Some interesting twists on using Python on the way to JavaScript. |
| Pyjamas | ||
| Reporting | Relatorio | A very neat reporting library with multiple output formats |
| Database | SQLAlchemy | See tutorial |
| Sybase module | I’ve used all of these at any one time, and pymssql worked out better for me. |
|
| FreeTDS | ||
| pymssql | ||
| GIS | geopy | an amazingly flexible geocoding library. |
| HTML and XML | BeautifulSoup | The most powerful HTML parser out there. |
| mxTidy | HTML Tidy for Python | |
| pygments | Python syntax highlighter able to handle multiple nested languages | |
| pyquery | A jQuery-like library for manipulating documents. | |
| cssutils | a CSS Cascading Style Sheets parser. | |
| Mechanize | a programmatic web browser for screen scraping. | |
| Gnosis Utilities | all sorts of XML goodies. | |
| lxml | a different libxml binding. |
|
| Web Application Frameworks | Bottle | Tiny, flexible, awesome. My favorite for 2011. |
| Tornado | non-blocking, which is pretty interesting. | |
| Django | The new hotness. | |
| Snakelets | A minimalistic app server, my current web platform of choice. | |
| Draco | Old and busted, to various extents. | |
| medusa | ||
| CherryPy | ||
| Karrigell | ||
| Twisted | ||
| Zope | ||
| Graphics | smc.freeimage | A wrapper for the freeimage library that can handle various TIFF and fax formats as well as ICC color profiles |
| Graphite | a real-time graphing system similar to RRDTool. | |
| SciPy | scientific (including plotting) libraries for Python. Most impressive. | |
| Pyx | Oldie, but goodie. | |
| Skip’s Python Bits | lots of useful snippets | |
| pygame | a game-oriented library with SDL support | |
| PDFMiner | a parser and text renderer that can identify location of text on a page and do basic rendering to HTML | |
| PyPdf | a PDF toolkit | |
| Kiva | a Display PDF library. | |
| ReportLab Toolkit | a pure Python PDF library that includes a presentation tool. |
Techniques
- daemon.py, an example daemon script.
- Pydoc – built-in Web help, anytime, anywhere
- How to Write a Spelling Corrector – an interesting technique that can come in handy to fix/suggest search terms, etc.
- Python Webcam Color Track
- Python webcam fun – motion detection
Notes:
Instant Web Server on port 8000:
#!/bin/sh
python -c '__import__("SimpleHTTPServer").test()'
