ron rothman.ron rothman
selectively conformist

» mtwsgi: A Multithreaded Python WSGI Implementation

by Ron
No comments yet

I wanted to combine the simplicity of Python’s built-in WSGI server with the benefits of concurrency, so I wrote this multithreaded drop-in replacement for wsgiref.WSGIServer.

Also included: a server adapter for use with Bottle.

Suggestions welcome.
…read the rest 

» Python 2.7.3 (Bug) Broke My Namedtuple Unpickling

by Ron

I just learned (*ahem* the Hard Way) that CPython 2.7.3 namedtuple is buggy when combined with pickling and older Python versions.

If you pickle a namedtuple using CPython 2.7.3, you won’t be able to successfully unpickle it using 2.7.2 (nor, presumably, using even earlier versions).

Here’s a short example. First, run this with Python 2.7.3:

# Pickle a namedtuple with python 2.7.3

import pickle
from collections import namedtuple
Point = namedtuple('Point', ('x', 'y'))

a = Point(4, 9)

with open('foo', 'w') as f:
    pickle.dump(a, f, -1)

Then, run this with 2.7.2:
…read the rest 

» Cygwin cron: Spurious Messages in Event Viewer

by Ron

I’ve been using Cygwin on my Windows partition to run a particular job every minute. Cron (Vixie’s cron) works perfectly, except that messages like this one were appearing (every minute!) in my Windows event log: …read the rest 

» Fixing minidom.toprettyxml’s Silly Whitespace

by Ron

Python’s xml.dom.minidom.toprettyxml has a feature/flaw that renders it useless for many common applications.
…read the rest 

» 2 Become 3

by Ron
"click me!"
“Leo loves you.”

» It’s a Boy!

by Ron

Please welcome our newest family member, Blake, into the world.
…read the rest 

» Is Home Birth Courageous?

by Ron

It’s funny. I’ve recently been told—by more than one person—that Sara and I are “brave” for planning to deliver our baby at home. This from people who are educated, intelligent and have my respect. And yet, they couldn’t have picked a worse way to characterize the decision. What’s going on here?

Read on, and then you tell me: isn’t it actually more courageous for a low risk mother-to-be to voluntarily walk into a hospital to give birth?
…read the rest 

» Canada Trip: Posted

by Ron

Finally posted the itinerary and photos from our summer trip to Quebec & Ontario.

Activities included:

  • Visiting friends
  • Cycling 100 miles of scenic converted rail line
  • Genealogy research in rural Quebec
  • Consumption of many and varied animal parts (not to mention: chocolate, cheese, poutine, et al.)
  • Ice wine tasting
  • Quebecois Folk music concerts
  • Watching Beluga whales from the breakfast table
  • Niagara falls in a barrel

Canada Trip: PostedCanada Trip: PostedCanada Trip: PostedCanada Trip: PostedCanada Trip: PostedCanada Trip: Posted

» CSA Inventory, Week 10

by Ron

Produce Roundup

fresh fruits and vegetables

This week’s vegetables. (Click for larger view.)

Fresh, organic and local. $12.

This week’s take:
…read the rest 

» Southeast Asia Trip: Epilogue

by Ron

We’re back home. (Boo.)

We’ll post our photos as soon as we sort through [all 1500 of] them.

Update: the photos have been posted.

Southeast Asia Trip: EpilogueSoutheast Asia Trip: Epilogue
Southeast Asia Trip: EpilogueSoutheast Asia Trip: Epilogue

» Southeast Asia Trip, Day 29: Leaving Khao Lak

by Ron
No comments yet

Heading to Phuket airport now. A mere 32 hours after we board our plane (Phuket -> Bangkok -> Tokyo -> JFK), we’ll be back in snowy New York.

For this final travelblog entry, I wish I could write something witty or amusing. But ending our trip has me so bummed that all I have to say is: it’s been a magnificent month.

» Southeast Asia Trip, Day 28: Khao Lak

by Ron
No comments yet

Today’s plan is to:

  1. have breakfast on our private veranda
  2. beachcomb
  3. bask by the pool
  4. eat as much coconut ice cream as possible
  5. get a beachside Thai massage
  6. order fruit drinks by the coconut-full
  7. lament that this is our last day here

» Southeast Asia Trip, Day 27: Khao Lak (Similan Islands)

by Ron
No comments yet

We snorkeled the Similan Islands today. Remarkably, the breathtaking underwater landscape we saw (heaps of beautifully colored fish and coral) really did resemble the glossy posters in the tour company’s sales office!

» Southeast Asia Trip, Day 26: Khao Lak

by Ron
No comments yet

Traveler’s Tip of the Day: When getting your hair cut in Thailand, don’t ask for it to be cut “short.”

» Southeast Asia Trip, Day 25: Khao Sok to Khao Lak

by Ron

After a few more hours of kayaking this morning (had some great wildlife sightings), we headed to Khao Lak for the final leg of our trip. We’re now at a 5-star resort just north of town, on a sparsely populated tract of white-sand beach. The contrast from last night is stark–we no longer need a flashlight to get to the bathroom. And instead of last night’s rudimentary, cold-water shower, we’ve got a teak-and-slate-appointed bathroom with a 2-person tub and 2 shower heads.

» Southeast Asia Trip, Day 24: Khao Sok National Park

by Ron
No comments yet

Besides kayaking, we’ve been doing some trekking here. Today’s hike was through a deep limestone cave, through which two different streams run. Thousands of bats, dozens of cave crickets, several large spiders, a few cave toads, and water deeper than our heads. At some points, I had to swim with one hand, trying to keep my other hand above the water (in that hand were: my [non-waterproof] flashlight, and our drybag, which held our [non-waterproof] camera.)

Definitely one of our trip highlights.