Blogs
Tags > python
PyMOTW: sys, Part 6: Low-level Thread Support
By Doug HellmannNovember 15, 2009
sys includes low-level functions for controlling and debugging thread behavior.
PyMOTW: sys, Part 5: Tracing Your Program As It Runs
By Doug HellmannNovember 8, 2009
There are two ways to inject code to watch your Python program run: tracing and profiling. They are similar, but intended for different purposes and so have different constraints. The easiest, but least efficient, way to monitor your program is through a trace hook, which can be used for writing a debugger, code coverage monitoring, or many other purposes.
Announcing O'Reilly Answers - Clever Hacks. Creative Ideas. Innovative Solutions.
By Allen NorenNovember 4, 2009
We're launching the beta of O'Reilly Answers, and I'm inviting you to be part of it. In brief, O'Reilly Answers is a community site for sharing knowledge, asking questions, and providing answers that brings together our customers, authors, editors, conference speakers, and Foo (Friends of O'Reilly). O'Reilly is at the center of an amazing exchange of knowledge sharing and idea generation, and we want you to join us in changing the world by spreading the knowledge of innovators.
PyMOTW: sys, Part 4: Exception Handling
By Doug HellmannNovember 1, 2009
sys includes features for trapping and working with exceptions.
PyMOTW: sys, Part 3: Memory Management and Limits
By Doug HellmannOctober 25, 2009
Python's sys module includes several functions for understanding and controlling memory usage.
PyMOTW: sys, Part 2: Runtime Environment
By Doug HellmannOctober 18, 2009
sys provides low-level APIs for interacting with the system outside of your application, by accepting command line arguments, accessing user input, and passing messages and status values to the user.
PyMOTW: sys, Part 1: Interpreter Settings
By Doug HellmannOctober 12, 2009
sys contains attributes and functions for accessing compile-time or runtime configuration settings for the interpreter.
Four short links: 6 October 2009
By Nat TorkingtonOctober 6, 2009
Bird-watching Turns To Technology (BBC) -- CCTV-esque automated bird watching. Sensor networks + computer vision for an ecological purpose. In a bid to track the guillemots behaviour, Dr Dickinson is refining established work that involves modelling the visual structure of an area around a nest. The computer system will be able to use this model to identify changing elements...
Four short links: 5 October 2009
By Nat TorkingtonOctober 5, 2009
Brown Cloud Marketing -- advertorial "interviewing" GM of a company offering "DNS in the cloud". This might be a worthwhile service, but the way he markets it (by saying open source is "freeware" and the market leader is "legacy") reveals a rich vein of bozo. Freeware legacy DNS is the internet's dirty little secret (actually, it's the reason we...
Four short links: 25 September 2009
By Nat TorkingtonSeptember 25, 2009
Diesel: A Case Study In That Thing I Just Said -- a new asynchronous I/O library in Python, which earned this fabulous review from Glyph Lefkowitz who wrote the granddaddy of all asynch libraries in Python, Twisted. Again, I don't want to dump on Diesel here; for what it is, i.e. an experiment in how to idiomatically structure asynchronous...
PyMOTW: resource - System resource management
By Doug HellmannSeptember 20, 2009
The functions in Python's resource module help you probe the current resources consumed by a process, and place limits on them to control how much load your program places on a system.
PyMOTW: fractions - Rational Numbers
By Doug HellmannSeptember 5, 2009
Python's Fraction class implements numerical operations for rational numbers.
PyMOTW: decimal - Fixed and floating point math
By Doug HellmannAugust 30, 2009
The decimal module implements fixed and floating point arithmetic using the model familiar to most people, rather than the floating point representation implemented by most computer hardware.
Four short links: 28 August 2009
By Nat TorkingtonAugust 28, 2009
What The Future's All About (Webstock Words) -- Bruce Sterling on the future. We’re not going to get a future Cloud World as somehow opposed to a future Augmented Reality World. It can’t happen. The ideas can be clearly distinguished, but ideas about technology, labels for technology, predictions and suppositions about technology, they don’t map onto actual real-world technology....
PyMOTW: dis - Python Bytecode Disassembly
By Doug HellmannAugust 23, 2009
The dis module converts code objects to a human-readable representation of the bytecodes for analysis.
Four short links: 12 August 2009
By Nat TorkingtonAugust 11, 2009
Improving Health Care -- Adam Bosworth's speech to the Aspen Health Forum. It starts strong and just gets better: There is a lot of talk about improving health care. And there is a lot to improve. Inadequate Evidence: We don’t know enough about what works. We should require sharing of population statistics across practices and hospitals in order to...
Four short links: 11 August 2009
By Nat TorkingtonAugust 10, 2009
The Slowing Growth of Wikipedia and More Details of Changing Editor Resistance -- researchers at PARC analysed Wikipedia and found the number of new articles and number of new editors have flattened off, and more edits from first-time contributors are being reverted. This is a writeup in their blog, with the numbers and charts. It's interesting that coverage in...
PyMOTW: pydoc - Online help for Python modules
By Doug HellmannAugust 9, 2009
The pydoc module imports a Python module and uses the contents to generate help text at runtime.
PyMOTW: In-Memory Data Structures
By Doug HellmannAugust 2, 2009
Python includes several standard programming data structures as built-in types (list, tuple, dictionary, and set). Most applications won't need any other structures, but when they do the standard library delivers.
Use APIs to do market research
By Andrew OdewahnJuly 30, 2009
Basic product attribute questions (what's the best price, size, length, etc) are crucial elements in any product or marketing strategy, but it's often too difficult or expensive to get timely market information. However, a quick script that pulls data from a relevant website's API can often give you an answer that's good enough. This post provides a few techniques for using this powerful new resource for market research.
Four short links: 28 July 2009
By Nat TorkingtonJuly 27, 2009
CNMAT Resource Library -- The CNMAT Resource Library is our fast growing collection of materials, sensors, gestural controllers, interface devices, tools, demos, prototypes and products - all organized and annotated to support the design of physical interaction systems, "new lutherie" and art installations. (via egoodman on Delicious) PyGoWave Server -- first third-party Google Wave server, based on Django. Mobile...
PyMOTW: Text Processing Tools
By Doug HellmannJuly 27, 2009
Python's standard library includes a variety of tools for working with text data.
PyMOTW: urllib2
By Doug HellmannJuly 19, 2009
The urllib2 module provides an updated API for using internet resources identified by URLs. It is designed to be extended by individual applications to support new protocols or add variations to existing protocols (such as handling HTTP basic authentication).
PyMOTW: abc - abstract base classes
By Doug HellmannJuly 5, 2009
Define and use abstract base classes for API checks in your code using the abc module.
PyMOTW: pyclbr
By Doug HellmannJune 28, 2009
pyclbr can scan Python source to find classes and stand-alone functions. The information about class, method, and function names and line numbers is gathered using tokenize without importing the code.
PyMOTW: robotparser
By Doug HellmannJune 21, 2009
robotparser implements a parser for the robots.txt file format, including a simple function for checking if a given user agent can access a resource. It is intended for use in well-behaved spiders or other crawler applications that need to either be throttled or otherwise restricted.
Four short links: 19 June 2009
By Nat TorkingtonJune 19, 2009
Inside-Out Multiplication Table -- very cool way to view the patterns of factors. Math is beauty with subscripts. High-Speed Camera -- capture 100 frames at up to 1M frames/second. The sample videos, of a bullet liquefying on impact and a shotgun string boiling past, are stunning. The Makezine high-speed photography kit is the cheap amateur version. Open Source Energy...
PyMOTW: gettext
By Doug HellmannJune 14, 2009
The gettext module provides an all-Python implementation compatible with the GNU gettext library for message translation and catalog management.
PyMOTW: json
By Doug HellmannMay 24, 2009
The json module provides an API similar to pickle for converting in-memory Python objects to a serialized representation known as "JavaScript Object Notation".
Visualizing the U.S. Senate Social Graph, 1991 - 2009 [Part 1]
By Andrew OdewahnMay 5, 2009
Arlen Specter's party switch was big news, but a quick visualization technique shows it was a long time coming. What other surprises might lurk in the Senate Social graph?
Four short links: 29 Apr 2009
By Nat TorkingtonApril 29, 2009
Moot Wins, Time Inc. Loses -- summary of how the 4chan group Anonymous rigged the voting in Time's 100 Most Influential poll to not just put their man at the top, but also spell an in-joke with the initial letters of the first 21 people. Time tried weakly to prevent the vote-rigging, and ReCAPTCHA gave the Internet scalliwags their...
PyMOTW: multiprocessing, part 2
By Doug HellmannApril 28, 2009
Communication and synchronization techniques using multiprocessing in Python.
PyMOTW: multiprocessing, part 1
By Doug HellmannApril 19, 2009
The multiprocessing module includes a relatively simple API for dividing work up between multiple processes based on the API for the threading module.
Simplify business research with Google Ajax Search API
By Andrew OdewahnApril 13, 2009
Business research usually starts with a list -- brands, competitors, people, products, whatever. This post describes a quick Python script that uses the Google Search API to automate the routine parts of the task, giving you more time to analyze and understand the results.
The App Engine Birds of a Feather at Pycon 2009
By Charles SeveranceApril 6, 2009
This was my second Pycon - since the last two have been in Chicago and on a weekend it has been an easy drive for me to attend coming from Michigan. Since last year was my first time at Pycon...
PyMOTW: pipes
By Doug HellmannApril 5, 2009
The pipes module implements a class to create arbitrarily complex Unix command pipelines. Inputs and outputs of the commands can be chained together as with the shell | operator, even if the individual commands need to write to or read from files instead of stdin/stdout.
Four short links: 2 Apr 2009
By Nat TorkingtonApril 2, 2009
Predictions, PDF, source code control, and recommendation engines: Wrong Tomorrow -- track pundits predictions and see how accurate they really are. From the ever-awesome Maciej Ceglowski. PDFMiner -- Unlike other PDF-related tools, it allows to obtain the exact location of texts in a page, as well as other layout information such as font size or font name, which could be...
PyCon 2009 and Looking to WSGI 2.0
By Eric LarsonMarch 30, 2009
I just returned from PyCon in Chicago. During the conference open spaces there was an open space discussing potential changes for WSGI. The three basic ideas were: Return a tuple with the status, headers, and response instead using the start...
PyMOTW: asynchat
By Doug HellmannMarch 14, 2009
The asynchat module builds on asyncore to make it easier to implement protocols based on passing messages back and forth between server and client.
PyMOTW: asyncore
By Doug HellmannMarch 1, 2009
The asyncore module includes tools for working with I/O objects such as sockets so they can be managed asynchronously (instead of, for example, using threads).
PyMOTW: tarfile
By Doug HellmannFebruary 22, 2009
The tarfile module provides read and write access to UNIX tar archives, including compressed files. In addition to the POSIX standards, several GNU tar extensions are supported.
Four short links: 16 Feb 2009
By Nat TorkingtonFebruary 16, 2009
A lot of Python and databases today, with some hardware and Twitter pranking/security worries to taste: Free Telephony Project, Open Telephony Hardware -- professionally-designed mass-manufactured hardware for telephony projects. E.g., IP04 runs Asterisk and has four phone jacks and removable Flash storage. Software, schematics, and PCB files released under GPL v2 or later. Don't Click Prank Explained -- inside the...
PyMOTW: grp
By Doug HellmannFebruary 15, 2009
The grp module can be used to read information about Unix groups from the group database (usually /etc/group).
Why I Started Coding Again (Thanks, Guido!)
By Brian McConnellFebruary 11, 2009
This is a follow up article to a piece I wrote in 2007, "Why I Stopped Coding and Why I'd Start Again". I took a several year hiatus from writing code, mostly because I found that I was spending more...
Bookworm and O'Reilly Labs
By Liza DalyFebruary 10, 2009
I'm extremely pleased to announce that the Bookworm project is now part of O'Reilly Labs.
PyMOTW: pwd
By Doug HellmannFebruary 8, 2009
The pwd module can be used to read user information from the Unix password database (usually /etc/passwd).
A RESTful wrapper for MoinMoin
By Uche OgbujiFebruary 4, 2009
I've always loved the MoinMoin wiki, and lately I've been using it for more and more, at work and at home. I've pined for a REST wrapper for a while, and I finally bit the bullet and wrote one, as part of the open-source Akara project, which among other things provides RESTful access to the XML processing capabilities of Amara 2.x.
Writing Technical Documentation with Sphinx, Paver, and Cog
By Doug HellmannFebruary 2, 2009
An open source tool chain for producing technical articles.
Concept Management
By Eric LarsonJanuary 30, 2009
Distributed version control systems have brought up some pretty important questions. A DVCS adds a good deal of complexity to an already complicated system. Source control is rather sticky business as it not only deals with complex content, but the...
Converting from Make to Paver
By Doug HellmannJanuary 18, 2009
Paver is a useful alternative to make, especially for Python-based packages.
1 to 50 of 84 Next


