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


Groups > comp.lang.python > #64191

Re: Compiling main script into .pyc

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!nntp.club.cc.cmu.edu!micro-heart-of-gold.mit.edu!bloom-beacon.mit.edu!panix!not-for-mail
From Grant Edwards <invalid@invalid.invalid>
Newsgroups comp.lang.python
Subject Re: Compiling main script into .pyc
Date Fri, 17 Jan 2014 20:12:56 +0000 (UTC)
Organization PANIX Public Access Internet and UNIX, NYC
Lines 25
Message-ID <lbc2s7$itl$2@reader1.panix.com> (permalink)
References <61a24c80-12fd-4c7a-89ed-41e997b66545@googlegroups.com> <52D89BC2.4000602@gmail.com> <52D8A143.4010206@mrabarnett.plus.com> <mailman.5623.1389933663.18130.python-list@python.org> <52d8ec89$0$29999$c3e8da3$5496439d@news.astraweb.com>
NNTP-Posting-Host dsl.comtrol.com
X-Trace reader1.panix.com 1389989576 19381 64.122.56.22 (17 Jan 2014 20:12:56 GMT)
X-Complaints-To abuse@panix.com
NNTP-Posting-Date Fri, 17 Jan 2014 20:12:56 +0000 (UTC)
User-Agent slrn/1.0.1 (Linux)
Xref csiph.com comp.lang.python:64191

Show key headers only | View raw


On 2014-01-17, Steven D'Aprano <steve+comp.lang.python@pearwood.info> wrote:
> On Thu, 16 Jan 2014 23:43:02 -0500, Dave Angel wrote:

> [steve@ando ~]$ cat sample.py
> print("Hello!")
>
> [steve@ando ~]$ ls sample.pyc
> ls: sample.pyc: No such file or directory
> [steve@ando ~]$ python -m compileall sample.py
> Compiling sample.py ...
> [steve@ando ~]$ ls sample.p*
> sample.py  sample.pyc
> [steve@ando ~]$ python sample.pyc
> Hello!

Cool!  Now I can distribute my application as a pre-compiled "binary"
just like I do for <insert language/platform/OS here>.

[That was meant ironically, BTW]

-- 
Grant Edwards               grant.b.edwards        Yow! I want EARS!  I want
                                  at               two ROUND BLACK EARS
                              gmail.com            to make me feel warm
                                                   'n secure!!

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


Thread

Compiling main script into .pyc Sam <lightaiyee@gmail.com> - 2014-01-16 17:01 -0800
  Re: Compiling main script into .pyc bob gailer <bgailer@gmail.com> - 2014-01-16 21:56 -0500
  Re: Compiling main script into .pyc Ned Batchelder <ned@nedbatchelder.com> - 2014-01-16 22:07 -0500
  Re: Compiling main script into .pyc MRAB <python@mrabarnett.plus.com> - 2014-01-17 03:19 +0000
  Re: Compiling main script into .pyc Dave Angel <davea@davea.name> - 2014-01-16 23:43 -0500
    Re: Compiling main script into .pyc Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-01-17 08:40 +0000
      Re: Compiling main script into .pyc Grant Edwards <invalid@invalid.invalid> - 2014-01-17 20:12 +0000
  Re: Compiling main script into .pyc Terry Reedy <tjreedy@udel.edu> - 2014-01-16 23:45 -0500
  Re: Compiling main script into .pyc Alister <alister.ware@ntlworld.com> - 2014-01-17 17:04 +0000

csiph-web