Answers for "check for python updates"

2

pip check for updates

$ pip list --outdated
Posted by: Guest on November-04-2020
16

how to update python

The explanation would be too long for a grepper answer.
So here is a link to a stackoverflow question:

https://stackoverflow.com/questions/45137395/how-do-i-upgrade-the-python-installation-in-windows-10
Posted by: Guest on November-22-2020
0

Python How to make your application check for updates

import Tkinter
import urllib

def updateCheck(self):
    update = False

    updateWindow = Tkinter.Toplevel()
    updateWindow.title(string="Update Checker")
    updateWindow.resizable(False, False)

    #Gets downloaded version
    versionSource = open('version.txt', 'r')
    versionContents = versionSource.read()

    #gets newest version
    updateSource = urllib.urlopen("http://www.suturesoft.com/Updates/craftbook.txt")
    updateContents = updateSource.read()

    #checks for updates
    for i in range(0,20):
        if updateContents[i] != versionContents[i]:
            dataLabel = Tkinter.Label(updateWindow,text="nnThere are data updates availible.nn")
            dataLabel.pack()
            update = True
            break
    for i in range(22,42):
        if updateContents[i] != versionContents[i]:
            versionLabel = Tkinter.Label(updateWindow,text="nnThere are version updates availible.nn")
            versionLabel.pack()
            update = True
            break
    if update == False:
        versionLabel = Tkinter.Label(updateWindow,text="nnYou are already running the most up to date version.nn")
        versionLabel.pack()
Posted by: Guest on May-10-2021

Python Answers by Framework

Browse Popular Code Answers by Language