If you put most of the code into a module, you could have the main file (which is the one that is run) check the update location, and automatically download the most recent version and install that, before the module is imported.
That way you wouldn't have to have a restart of the application to run the most recent version, just reimport the module.
# Check version of module
import module
# Check update address
if update_version > module.version:
download(update_module)
import module
reload(module)
module.main()
You can use the reload() function to force a module to reload it's data. Note there are some caveats to this: objects created using classes in this module will not be magically updated to the new version, and "from module import stuff" before the reimport may result in "stuff" referring to the old object "module.stuff".
[Clearly, I didn't read the previous post clearly enough - it does exactly what I suggest!]