read and write java properties in python