Change python method apply to unix only