This is causing problems on my mac, and won't work on Windows.  Is there a python-based way to do this?