Mini Searches with Answers

These are links associated with recent searches I’ve done. They’re not difficult enough to warrant to their own posts but still super useful.

geopy – Geocoding Toolbox for Python
geopy makes it easy for developers to locate the coordinates of addresses, cities, countries, and landmarks across the globe using third-party geocoders and other sources of data, such as wikis.

Why I ditched XMLRPC in favor of Pyro – O’Reilly ONLamp Blog
I was searching for "Pyro vs SimpleXMLRPCServer" since they both kind of do the same thing, I was curious how they compared. Here is at least one point for Pyro, it handles the None datatype.

Here is a Decorator I finally Understand
(formatting may not carry over from Del.icio.us)
>>> def addspam(fn): … def new(*args): … print "spam, spam, spam" … return fn(*args) … return new … >>> @addspam … def useful(a, b): … print a**2 b**2 … >>> useful(3,4) spam, spam, spam 2

ASPN : Python Cookbook : Module to allow Asynchronous subprocess use on Windows and Posix platforms
Here’s how to use subprocess in Python to read printed values from a launched process before it exits, and to interact with it in general. Apparantly the default action with subprocess is to wait until a process exits to read its pipe?

Python – how to kill a process without leaving zombies
os.kill(pid, signal.SIGKILL);
killedpid, stat = os.waitpid(pid, os.WUNTRACED) ;
if killedpid == 0:
print >> sys.stderr, "ACK! PROCESS NOT KILLED?";

Tags: , , , , , , , , , , , , , , , , ,

Comments are closed.