Qt for Python app self-update

I would like to request a memorandum and correction.

I noticed that even if the application is not packaged, if you do not include a mechanism to update it, you will have to copy it on each machine every time you modify it. It's easy to download via http and unzip the zip file, so why not combine them and update the .py file in the application directory? So, the relevant part is like this.


    def updateDownloadQuit(self):
        url ="http://〜〜"
        title = './update.zip'
        urllib.request.urlretrieve(url,"{0}".format(title))

        QMessageBox.information(None, "Info",  "Update the application and exit")
        with zipfile.ZipFile('update.zip') as existing_zip:
            existing_zip.extractall('.')

        MainWindow.close()

Even if it is not Qt, I think it can be used to distribute a small set of scripts.

Recommended Posts

Qt for Python app self-update
Make Qt for Python app a desktop app
Python QT app Standalone App conversion memo
2016-10-30 else for Python3> for:
python [for myself]
Tweet (API 1.1) on Google App Engine for Python
Adjust font differences between Qt for Python OS
About Python for loops
Python basics ② for statement
About Python, for ~ (range)
python textbook for beginners
Refactoring tools for Python
OpenCV for Python beginners
Install Python (for Windows)
[Python] for statement error
Python environment for projects
Make your python CUI application an app for mac
PIL with Python on Windows 8 (for Google App Engine)
Getting Started with Google App Engine for Python & PHP
Python memo (for myself): Array
About Fabric's support for Python 3
Python list, for statement, dictionary
[Python] Created a transformation app for world champion "Mr. Satan"
Python for Data Analysis Chapter 4
Modern Python for intermediate users
Learning flow for Python beginners
Python 3.6 installation procedure [for Windows]
BigQuery integration for Python users
Python learning plan for AI learning
Set Up for Mac (Python)
Search for strings in Python
Python Tkinter notes (for myself)
OpenCV3 installation for Python3 @macOS
Python code memo for yourself
[Python] xmp tag for photos
Python environment construction For Mac
Techniques for sorting in Python
pp4 (python power for anything)
Python3 environment construction (for beginners)
Roadmap for publishing Python packages
Python 3 series installation for mac
Python #function 2 for super beginners
Python template for Codeforces-manual test-
Basic Python grammar for beginners
Python for Data Analysis Chapter 2
100 Pandas knocks for Python beginners
Checkio's recommendation for learning Python
Keyword arguments for Python functions
[For organizing] Python development environment
[Python] Sample code for Python grammar
Python for super beginners Python #functions 1
[Python / PyQ] 4. list, for statement
Simple HTTP Server for python
[Python + Selenium] Tips for scraping
Python #list for super beginners
~ Tips for beginners to Python ③ ~
Extract only Python for preprocessing
Indentation formatting for python scripts
Introduction to Python For, While
About "for _ in range ():" in python
tesseract-OCR for Python [Japanese version]