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


Groups > comp.lang.python > #64134

Re: Compiling main script into .pyc

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!newsfeed.kamp.net!newsfeed.kamp.net!feeder1.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.81.MISMATCH!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <bgailer@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.054
X-Spam-Evidence '*H*': 0.89; '*S*': 0.00; 'imported': 0.09; 'subject:into': 0.09; 'subject:script': 0.09; 'python': 0.11; 'wrote:': 0.18; 'import': 0.22; 'header:User-Agent:1': 0.23; 'subject: .': 0.24; 'script': 0.25; 'compiled': 0.26; 'gets': 0.27; 'header:In-Reply-To:1': 0.27; 'to:2**1': 0.27; 'received:google.com': 0.35; 'message-id:@gmail.com': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'to:addr:gmail.com': 0.65; 'it!': 0.67; 'sam': 0.68; 'compiling': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=W69sONRdQor+zikiLYBx2ykOgz3TYkw+sGQk6iRxFUY=; b=w7/STrKUXqgEs3XwERdFcL52G80rF+8QBD40k24c0kyxkIFaC4lcabYB5t1EonK+Ax Ph/6Auqt2vwzy0+EJSUSo5QSaLlKAp2pOVIsHaeKZTbjsAwrqOGTe0ZCxlIIbRej3Tkb 7UCwaWXbAgUMz+J/d/EwK9p1xdxNFjW9iRkkVOg4XDtqmbXXPybUyl7W9rY6BwIuF90Y UktwzFjxu+dNkO4M2Ynjd19/QxKfiobNVKaA/Ys+seH9AoWxMcKOq7fHJ+asRqj3FECo LWmYGVrUksYps07CkslM6nXWS7ugPI7N9px9ZtEmfuo690LErxoUQVVJtwjZjnGJ+H/l jrsw==
X-Received by 10.140.43.3 with SMTP id d3mr13695561qga.70.1389927396905; Thu, 16 Jan 2014 18:56:36 -0800 (PST)
Date Thu, 16 Jan 2014 21:56:02 -0500
From bob gailer <bgailer@gmail.com>
User-Agent Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0
MIME-Version 1.0
To Sam <lightaiyee@gmail.com>, python-list@python.org
Subject Re: Compiling main script into .pyc
References <61a24c80-12fd-4c7a-89ed-41e997b66545@googlegroups.com>
In-Reply-To <61a24c80-12fd-4c7a-89ed-41e997b66545@googlegroups.com>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
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.5620.1389927400.18130.python-list@python.org> (permalink)
Lines 5
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1389927400 news.xs4all.nl 2845 [2001:888:2000:d::a6]:59337
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:64134

Show key headers only | View raw


On 1/16/2014 8:01 PM, Sam wrote:
> One thing I observe about python byte-code compiling is that the main script does not gets compiled into .pyc. Only imported modules are compiled into .pyc.
>
> May I know how can I compile the main script into .pyc?
Duh? Just import it!

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