The problem is likely to do with the files having the same creation date. See this SO question : Python's imp.reload() function is not working?
I was able to get this code working by inserting a sleep statement:
# replace NEW_PARAMETER in options.py with numbers in the range 0-9
for ii in range(10):
new_value = ii
# Sleep here to let the system clock tick over
time.sleep(1)
with open('./options.py', 'w') as fd_out:
fd_out.write('NEW_PARAMETER = %d\n' % (new_value,)) # write
fd_out.flush()
os.fsync(fd_out.fileno())
reload_options()
print ii,options.NEW_PARAMETER