How to set output file permissions using matplotlib savefig()?
matplotlib.pyplot.savefig() does not have capability to change file permissions. It has to be done afterwards with os.chmod(path, mode) for example os.chmod(fname, 0o400).
How can I specify the *nix read/write permissions for an output file (e.g. PDF) produced by the matplotlib savefig() command from within a Python script? i.e. without having to use chmod after the file has been produced.