do not show "file overwriten" message in python
<p>I need to use pyfits (<a href="http://www.stsci.edu/institute/software_hardware/pyfits" rel="nofollow">http://www.stsci.edu/institute/software_hardware/pyfits</a>) to open/write some spectra for the work I am doing. Problem is, everytime I use the "writeto" function to write a .fits file and it overwrites it, I get a "Overwrite existing file: XXX.fits" message on the screen. Is it possible to tell the program to not show this partiular message?</p>

<p>I already checked and could not find a keyword for the "writeto" function that would  deactivate this message, so I was thinking if there was anyway to tell python to redirect all output (except if it is an error) of a particular function to something like /dev/null or similar.</p>

<p>Worst case scenario, I thought that maybe using "logging" and redirect all output to a file and thats it.. </p>

<p>Any ideas?</p>
