If a new file is created by open ('xxx', 'w') How can I control the file permission bits? Is my only choice to use chmod after opening, or use os.open? Wouldn't this be a good thing to have as a keyword for open? Too bad what python calls 'mode' is like what posix open calls 'flags', and what posix open calls 'mode' is what should go to chmod.