pure python libprocess implementation