python: removed assumption of OS independance