Answer the question
In order to leave comments, you need to log in
How to organize the process of updating a program in python?
Greetings, as a novice python programmer, I had a question about how to organize a program update without forcing the user to download the entire program again, so let's say "updating only the changed parts", I tried to google, but I can’t even imagine how to issue a request.
Thank you in advance!
Answer the question
In order to leave comments, you need to log in
If the task is to update the source files of programs, then there is such a concept of creating a cast of differences and supplying this file for updating.
There are special utilities in Linux:
man diff
man patch
jungels.net/articles/diff-patch-ten-minutes.html
There is a python implementation from Google. With it, it will be possible to deliver updates in the form of py files (here I mean that you can deliver the update as a python program that will patch sorts using the necessary patches). https://code.google.com/p/google-diff-match-patch/
You can also use git to do this, as is done in oh-my-zsh.
You can wrap git commands in your update application in a way that is transparent to the user.
If all files in the program are text, then diff+patch.
If there are large binary ones, then en.wikipedia.org/wiki/Xdelta
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question