Path: csiph.com!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail From: Oscar Benjamin Newsgroups: comp.lang.python Subject: Re: How does one distribute Tkinter or Qt GUI apps Developed in Python Date: Thu, 17 Dec 2015 15:30:02 +0000 Lines: 50 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: news.uni-berlin.de nSsxJev2DaFA1tDjq3GZ1wTb8BZ6TjDnK5lxrMUFlj4g== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:Python': 0.05; 'executable': 0.07; 'cc:addr:python-list': 0.09; 'subject:How': 0.09; 'extension.': 0.09; 'path.': 0.09; 'python': 0.10; 'assume': 0.11; 'files.': 0.13; 'apps': 0.15; 'bytecode': 0.16; 'cc:name:python list': 0.16; 'executable.': 0.16; 'installer.': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'run.': 0.16; 'scripts.': 0.16; 'subject:GUI': 0.16; 'subject:Tkinter': 0.16; 'tkinter.': 0.16; 'wrote:': 0.16; 'app': 0.16; 'shipped': 0.18; 'gui': 0.18; 'windows': 0.20; '2015': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'developers.': 0.22; 'tkinter': 0.22; "user's": 0.22; 'seems': 0.23; 'bruce': 0.23; 'tutorials': 0.23; "haven't": 0.24; 'header:In-Reply-To:1': 0.24; 'install': 0.25; 'installed': 0.26; 'linux': 0.26; 'distribute': 0.27; 'possibility': 0.27; 'message-id:@mail.gmail.com': 0.27; 'page.': 0.28; 'url:peps': 0.29; 'tutorial': 0.29; "i'm": 0.30; 'creating': 0.30; 'users.': 0.31; 'option': 0.31; 'anyone': 0.32; 'another': 0.32; 'december': 0.32; 'knows': 0.32; 'related': 0.32; 'computer.': 0.32; 'embedded': 0.32; 'maybe': 0.33; 'run': 0.33; 'url:python': 0.33; 'common': 0.33; 'similar': 0.33; 'file': 0.34; 'this?': 0.34; 'running': 0.34; 'received:google.com': 0.35; 'exist': 0.35; 'url:dev': 0.35; 'expected': 0.35; 'but': 0.36; 'too': 0.36; 'should': 0.36; 'needed': 0.36; 'there': 0.36; 'url:org': 0.36; 'received:209.85': 0.36; 'basic': 0.36; 'heard': 0.36; 'subject:: ': 0.37; 'mac': 0.37; 'missing': 0.37; 'itself': 0.38; 'received:209': 0.38; 'skip:p 20': 0.38; 'someone': 0.38; 'end': 0.39; 'sure': 0.39; 'whatever': 0.39; 'application': 0.39; 'some': 0.40; 'software': 0.40; 'your': 0.60; 'video': 0.62; 'skip:n 10': 0.62; 'relatively': 0.63; 'different': 0.63; 'complete': 0.63; 'here:': 0.63; 'online': 0.71; 'approaches': 0.72; 'click': 0.76; 'training': 0.78; 'hard.': 0.84; 'oscar': 0.84; 'graphical': 0.91; 'watched': 0.91; 'average': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=TTyZnU1R3rqWR+T/tjr2cIJSRMbwPj/0Ap5Ga8duI4E=; b=sf1J29oyYWtnbSkmJGBry+KHqfmLCytfOvuHBTL+lLMz5P7jhxGKc4gbGUKEVNkvCs GbhdELKC72wCq1/8TTs8knkLsT67a18YKRxkpUWZA2FYAjDyLOoSm5BTaeR2uNkGQmlN flR/GWDA5BTsEhMN9zyPLDfzs8zmEXwHNYTm6RT7Dr5oiO2Fhw9284a6oCb4GWzOA23a eacFEN845GWmEBG12bpcAZNLZ9LGDqFy8+6E72xYA4qi6GEycc7FtHPvS1TBQHpGBbnm cHEk91Yxa8iUoliECPX2aC7/wdN8wp9tWd3VvLnTwXckjmOM/C1LYStpyYawZZ8ufDW3 ZtCw== X-Received: by 10.112.137.132 with SMTP id qi4mr22834124lbb.120.1450366222490; Thu, 17 Dec 2015 07:30:22 -0800 (PST) In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:100569 On 17 December 2015 at 00:03, Bruce Whealton wrote: > I watched one training video that discussed Python and Tkinter. Like many= similar tutorials from online training sites, I was left scratching my hea= d. > > What seems to be blatantly missing is how this would be distributed. In t= he first mentioned tutorial from Lynda.com the Tkinter app was related to a= web page. However, the browser cannot run Python Bytecode or Python Script= s. > > Surely, one is going to want to create GUI apps for users that are not Py= thon Developers. I would not think to ask someone to install Python on thei= r system and make sure it is added to the path. Maybe it is not so hard for= the non-technical, average users. > > I would want to package in some way so that when launched, it installs wh= atever is needed on the end user's computer. How is this done? > Are there common practices for this? There are different general approaches in this area. One possibility is to ship an installer. Another is to try and ship a complete single file executable. For the single-file executable you have pyinstaller/py2exe/py2app etc. If you're user can be expected to install the software before running it then in the basic case it is not too hard. Python itself comes with a graphical installer for Windows and is already installed on every other OS. If you can assume that Python is installed then you can distribute your application simply as a zip file but with a .py(z)(w) file extension. See here: https://www.python.org/dev/peps/pep-0441/ A Windows user should then be able to simply double click the .pyz file and have it run. I'm not sure how that works on a MAC but on Linux you can preface the zip file with a shebang make it executable and it will run from the terminal and from any file-browser if it knows how to run executable files. Another option for Windows although it is relatively new is that as of Python 3.5 there is an embedded distribution of Python that is intended to be shipped as part of an application installer and installed local to the application. This is new and I haven't heard anyone using it and don't know if any tools exist to help actually creating an installer using it. -- Oscar