primitive sitecopy replacement in Python