<disclaimer>I didn't try it</disclaimer> Would that one help? https://github.com/nelhage/reptyr Thomas