python tool: windows related fixes