Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

python - Check for updates for a program [closed]

Tags:

python

xml

I have developed my own program, but I would like to be able to dynamically tell the user that there is an update available for the program. This program is designed to be cross-platform, and is written in python. There will be two types of updates:

1) data updates (an xml file that includes the information required to run the program was updates) - This type of update will occur much more often

2) System updates (the actual executable [a python program compiled] is updated - This type of update will not occur as often

I need to be able to connect to an online database and compare the version posted there to the current program version to see if there is any update. If there is an update from the server, the program needs to be able to download and install that update with minimal user input. My question is how would I tell my program to systematically check for the update and then download and install it without crashing the program or asking the user to manually download and install it?

like image 621
Ben Schwabe Avatar asked Dec 27 '22 16:12

Ben Schwabe


1 Answers

Set up a simple web service that returns the current version number of the xml file and the executable. Have your program dial home to this web service on startup, and if the web service returns a newer version number then what the program has in its local copy then display a message to the user saying they could update (or start an automated update process).

like image 54
Joe Day Avatar answered Dec 29 '22 11:12

Joe Day