How to update a python application over internet? - python

I've been building a Python 2.7 app with a gui made in PyQt4. For some time I was wondering how can I integrate an update service for my app. I use 2 versions, one build for linux using cx_freeze and the other one for windows using cx_freeze too.
I looked on internet but I didn't had much luck. All I managed to do is to check the current version and the new version on my server, but I want to start downloading the new files and replace the old ones.

Related

Cross Platform Python Executable - Mac & Windows?

I used pyinstaller to create an executable file (Desktop GUI). I am on Windows, and the person I am sending it to is on Mac.
I was under the impression that pyinstaller was cross platform, but the Mac user gets an error when trying to run the app. What are my options for distributing my GUI for both Windows and Mac?
I have not been able to find a straightforward answer and do not have a Mac to test with. I saw Inno Setup, but haven't found anything saying whether or not it's cross platform.
I need to create a script that can run both Windows and Mac. I am also looking for an easy way to send it electronically.
I have no knowledge of Python but after a quick serach on the internet came up with this which might help you.
A few months ago I went through this process (rather painstakingly I might add) to deploy a simple Xamarin Cross Platform App. In my own experience I have learned that the macOS has very strict rules about how software is to be packaged for deployment on a computer.
If you are using Visual Studio for Mac it will automatically build a packaged installer for you. But, you do have to purchase (at an yearly cost) a Developer ID.
Then, you create specific provision profiles for your application and these are used along with your developer ID to sign your packaged installer. I found it somewhat complicated!
Finally, you follow a procedure via the console on the mac to submit your package for an automatic scan. This is referred to as getting your package notarized (link to a SO question about that process).They provide you a result that then gets stapled to the package.
It is like a double signing. Once this is done then the package can be installed by users using the macOS.
An alternative is that the user run a instance of Windows by using a software package called Parallels. I have to say it is very good and I did enjoy my trial of the software, You can fire up Windows from inside the macOS (no need to reboot) and since it is Windows you can simply run your stahdard installers.
In summary, for the macOS, if you do not correctly sign your package with a developer and application ID, and don't get it notarized and stapled the operating system will throw it back out at you and not run it.

Import external libraries Kivy without buildozer

Recently I've been working on a project that involves a phone taking a picture, processing it in some way, and returning the output on the screen. In order to do this, I would have to use openCV, but when I try to "import cv2" in the Kivy code using the launcher, the app crashes immediately after I run it. I realize now that the reason this happens is because the Kivy launcher by itself can only do basic functions like print and such and there must be extra steps needed to use external libraries. I tried to use Buildozer to create a package for android, but soon found out that it only would work for linux computers, while I use Windows.
Essentially, my question is: Is there any way to include an external library in Kivy without using buildozer? And if there is, could you please describe it or post a link to a webpage that contains instructions(as I am fairly new to programming and am somewhat of a noob)
Thanks!
You can try python-for-android.
But the easiest way - install virtual box to your PC, download kivy/buildozer for VirtualBox( it calles Virtual Machine (for Android/buildozer)) here below: https://kivy.org/#download and then just connect downloaded vmdk-disk to VirtualBox, and then use this. Everything is prepared, you don't need to install kivy or buildozer.
You will spend about 30-40 minutes.

How to distribute python software to users of low technical ability?

I have a python application (3.5) that I’m trying to distribute. It:
Uses no GUI libraries (it runs in the browser)
Uses several external packages (Flask, SocketIO, httplib2)
maintains saved config and data files inside the main source directory
The target users:
Use Mac or Windows
Do not understand the concept of the terminal/command line (testing has shown that it can take hours to teach users how to cd into the source directory to run a .py file).
Generally have little difficulty installing the python interpreter from python.org (but have great trouble starting and exiting the python console).
Are generally of very low technical ability.
Preferably, the app should:
be “click and play”, as I have found that typically the cd navigation is the biggest hurdle preventing users from running my application.
not require manually modifying any system settings
I am developing from Ubuntu Linux. I have access to a Windows VM, but not a Mac computer. How do I distribute my application?
There are a couple of applications that can help you to distribute a Python Application, for this case you want to take a look on Python freezing tools like py2exe (windows only) or py2app (MacOs).
This two will help you distribute your code without all the hassle of making the user to install the dependencies and run anything from the command line.
However if your application runs on the browser, you probably want to just put that into a server (take a look of openshift, it's free) it will make your life a lot easier.

trying to install kivy on windows 8.1

I'm trying to install kivy to make an application for android and ios.
I have installed the portable app as per the website but wanted to have it included in my python Idle.
So I searched and found Kivy-1.8.0.win32-py3.4.exe installs it ontop of your python instalation (C:\python34)
When i try and import i can import kivy but it wont let me install App or recognise UIX.
I have looked around and I think that my issue is with pygame, every time i try to install it i get missing files and that is with pip and a pygame-1.9.2a0.win32-py3.2.msi that i found but still nothing!
Also read it might be cython and i installed that too downloading Cython-0.21.1 andtrying to run the instaltion on that.
Is there a way to get this done without a headache?
Do i need kivy to make an app for android and ios or can i use tkinter? (thats works on my pc lol)
please any advice would be great, I have searched but all the information out there is very disjointed and im hoping to find a one stop answer in one of you guys.
thanks
Raif
Do i need kivy to make an app for android and ios or can i use tkinter? (thats works on my pc lol)
You need kivy (or maybe some other python tools, but I don't think any are remotely as good). The android build tools only work on linux or osx, though you can use a virtual machine for it.
If you installed from the popular unofficial windows binaries site, make sure the version matches your python version, and you probably need to get pygame from the same place. I don't know much about this though.
Linux is the best python development environment. Python on Windows is very very buggy with certain packages due to compatibility issue. Many important development packages in python are optimized for Linux. You get rid of all headache by downloading and installing a lightweight Linux like o. So like back box on a virtual machine.
If your goal is a Kivy app for iOS and Android, you have already made several mistakes. The first is that you cannot create an iOS app from any OS except OSX. There's no way around that. The second is that the tools for compiling for Android and iOS only work with Python2.7 currently. You seem to be using Python 3.4.

Distributing python on Mac, Linux, and Windows using cx_freeze: can I generate all apps from one platform?

I'm setting up a scripted build of a cross-platform python app (Python 3) and I'd like to create all the distributables from linux. Is that possible?
Short answer: no
I've been doing something similiar recently (using cx_Freeze with Python 3). If you set up Python inside Wine, you can generate a Windows build, but I had to copy some DLLs in before it worked properly (cx_Freeze calls a Windows API function that's not implemented in Wine). I've not run into any way of packaging applications for Macs without actually having a Mac.
Perhaps someone should set up a community build service so people could build distributables for different platforms for each other. That doesn't get round the problem of testing, though.

Categories

Resources