Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #75058

Re: Distributing python applications as a zip file

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin3!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <chris@rebertia.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.042
X-Spam-Evidence '*H*': 0.92; '*S*': 0.00; 'subject:file': 0.07; '22,': 0.09; 'modulo': 0.09; 'python:': 0.09; 'python': 0.11; 'subject:python': 0.16; 'wrote:': 0.18; 'seems': 0.21; 'cheers,': 0.24; 'file.': 0.24; 'nearly': 0.26; 'distribute': 0.26; 'header :In-Reply-To:1': 0.27; 'function': 0.29; 'chris': 0.29; 'feature': 0.29; 'message-id:@mail.gmail.com': 0.30; "d'aprano": 0.31; 'steven': 0.31; 'file': 0.32; 'quite': 0.32; 'something': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'url:org': 0.36; 'application': 0.37; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'little': 0.38; 'to:addr:python.org': 0.39; 'called': 0.40; 'users': 0.40; 'zip': 0.64; 'jul': 0.74; '(probably': 0.84; 'sender:addr:chris': 0.84; 'url:latest': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=rebertia.com; s=google; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type; bh=MszGyLMtkn7L02QGZ9ikj/C6dI7ljZVq+KUQNKH5UcE=; b=L2S6VQuldfpxn62vW6ex9uzIjYVtJPg1nKxQHzyOWRrgtWAOYGpghbPkxxlLtxtHn8 fciP68acR4dhgTWMqPEAv37vvSfTYD1j8o2UDcdQdQBVMKFv6aufwzkLxnh3zZ3+QlgB 2CcEQkyr5zTRTADQVPh8oVnOery/MSf2ZoE/g=
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=MszGyLMtkn7L02QGZ9ikj/C6dI7ljZVq+KUQNKH5UcE=; b=ThUm54P7oTNBrPjltWwobmsWq+30Jj5Y+TDmK6jJmQuI23Hdz6unhh1iOXGhT0o+ML I/CVj+9DGkxglW2XLcMp+0Ddb0gqUW74XqpuA0Mx8U+jOBL1RwVBDcMBJ/3qq3cEL1FV Kc60ZlU0x311o8aVC3bmY6hpUwxTtyd0rml6lFoI0WlW1PFGAQknNKImIYz8SZ/WtMM7 wlwX7gZ9QId6q9dmBAsvhIYooU/ZZok2t4MjYHNBZAsmsajre2NIbADjDtsoFFQALNiH +SHiThyJwkpc3LdDNCFxLtM3PciwY0CqxOtxJv1lZeI3FP0eRj1CO1dDql48k6awiwYM +ABg==
X-Gm-Message-State ALoCoQltE5Sd1CFlhxYRbvqtlQyxpJJsW0mgNF2iOwQjVXaQk7Cd1B4g9Qk2QmPGt1vF5+NSZOt9
MIME-Version 1.0
X-Received by 10.42.62.6 with SMTP id w6mr34529091ich.24.1406094378311; Tue, 22 Jul 2014 22:46:18 -0700 (PDT)
Sender chris@rebertia.com
In-Reply-To <53cf38c2$0$29897$c3e8da3$5496439d@news.astraweb.com>
References <53cf38c2$0$29897$c3e8da3$5496439d@news.astraweb.com>
Date Tue, 22 Jul 2014 22:46:18 -0700
X-Google-Sender-Auth mteLTjf1bingWTMz6kmxbT7oI1A
Subject Re: Distributing python applications as a zip file
From Chris Rebert <clp2@rebertia.com>
To Python <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.12217.1406094386.18130.python-list@python.org> (permalink)
Lines 16
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1406094386 news.xs4all.nl 2838 [2001:888:2000:d::a6]:43131
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:75058

Show key headers only | View raw


On Tue, Jul 22, 2014 at 9:23 PM, Steven D'Aprano <steve@pearwood.info> wrote:
> A little known feature of Python: you can wrap your Python application in
> a zip file and distribute it as a single file. The trick to make it
> runnable is to put your main function inside a file called __main__.py
> inside the zip file.
<snip>
> It's not quite self-contained, as you still need to have Python
> installed, but otherwise it's a good way to distribute a Python
> application as a single file that users can just copy and run.

And if you want something nearly completely self-contained (probably
modulo dynamic linking), it seems that there's PEX
(http://pex.readthedocs.org/en/latest/ ).

Cheers,
Chris

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Distributing python applications as a zip file Steven D'Aprano <steve@pearwood.info> - 2014-07-23 04:23 +0000
  Re: Distributing python applications as a zip file Gary Herron <gary.herron@islandtraining.com> - 2014-07-22 22:30 -0700
  Re: Distributing python applications as a zip file Chris Rebert <clp2@rebertia.com> - 2014-07-22 22:46 -0700
  Re: Distributing python applications as a zip file Tim Golden <mail@timgolden.me.uk> - 2014-07-23 08:20 +0100
  Re: Distributing python applications as a zip file Chris Angelico <rosuav@gmail.com> - 2014-07-23 17:59 +1000
  Re: Distributing python applications as a zip file Thomas Heller <theller@ctypes.org> - 2014-07-23 10:07 +0200
  Re: Distributing python applications as a zip file Leo Jay <python.leojay@gmail.com> - 2014-07-23 16:43 +0800
    Re: Distributing python applications as a zip file Alan <alan.isaac@gmail.com> - 2014-07-24 05:19 -0700
  Re: Distributing python applications as a zip file Burak Arslan <burak.arslan@arskom.com.tr> - 2014-07-23 15:23 +0300
    Re: Distributing python applications as a zip file Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-07-24 00:55 +0000

csiph-web