M
M
Macbet2014-01-06 23:27:53
Python
Macbet, 2014-01-06 23:27:53

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

2 answer(s)
V
verwolfdotss, 2014-01-06
@Macbet

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.

I
Ilya Evseev, 2014-01-07
@IlyaEvseev

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 question

Ask a Question

731 491 924 answers to any question