Reimplemented pyxf.py to be Windows compatible