May-09-2019, 06:36 AM
There is my code, he work with python 2.7 on linux
the icon befor. Second problem, I can't make a sleep because the time of the update can change.
So my question is : How can I make a session of os.system for be sure that my script wait the end of the update.
print "OUI" os.system("python ../updater.3.pyc") os.system("cd .. | pwd") path = "../../.." files = os.listdir(path) listeFichiers = [] for (repertoire, sousRepertoires, fichiers) in walk(path): for fichiers2 in fichiers: if u'.cap.' in fichiers2: #//////These commande must be make after the update listeFichiers.append(fichiers2) avant = fichiers2.replace(".cap", "") shutil.copyfile(repertoire + "/" + avant,repertoire + "/" + fichiers2.replace(".cap", ".old") ) shutil.copyfile(repertoire + "/" + fichiers2, repertoire + "/" + avant)My script have to make an update and after that change png icon, but the problem is that my script don't wait the end of the update and change
the icon befor. Second problem, I can't make a sleep because the time of the update can change.
So my question is : How can I make a session of os.system for be sure that my script wait the end of the update.