Let's say I have a Python program that opens a file and overwrites it with zeros, and I run it on a Windows 7 computer formatted in NTFS. If this is done on an HDD (not an SSD) will the file be overwritten in place on the disk, or will the changes be written in a new sector and the file link updated?
To check the before and after location of the file you can use the DiskView tool from http://technet.microsoft.com/en-au/sysinternals/bb896650.aspx
Are you looking for a tool that will write all free space with zeroes? There is a MS tool available for that but the way it works is that it creates new files filled with the same content (by default not zeros but compresses well anyway), and then deletes them all. See http://support.microsoft.com/kb/833138 for more info. It is also called "Virtual Disk Precompactor.ISO" and it is installed with Virtual PC or XP mode.
However this does create a short time when the disk is full and if the system is in use at the time it will spray new files all over the disk. I was thinking that if you could make use of the defragmentation APIs to move a zero filled file to all free space locations on the disk it would have less impact on the running system. But I've not seen any tools for doing this.
If you are looking for a tool to securely delete files there is one available from Microsoft on http://technet.microsoft.com/en-au/sysinternals/bb897443.aspx called sdelete which actually does some tricky things with the defragmentation API to actually erase sparse and compress files while just writing zeroes to those types of files will not write the zeroes to the same location as the old content due to the way ntfs works. The link for the sdelete program gives a description of this. Note that sdelete does not need to be installed as it is self contained.