A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-February/098017.html below:

[Python-Dev] __file__

[Python-Dev] __file__David Bolen db3l.net at gmail.com
Sun Feb 28 00:10:26 CET 2010
Steven D'Aprano <steve at pearwood.info> writes:

> Personally, I can't imagine ever wanting to ship a .pyc module without 
> the .py, but since Python already gives people the opportunity to shoot 
> themselves in the foot, meh, we're all adults here.

Not sure I've seen it mentioned in this thread, but for myself, I've
certainly used (indirectly) such a distribution many times when
packaging applications with py2exe for installation on Windows
clients.  That puts all the pyc files into a single support zip file
from which the application runs.

That seems a perfectly useful use case, and not due to any issues with
security/obfuscation.  The matching interpreter is being packaged with
the application, so there's no version worries with the pyc.  The
files are internal to a zip, so why complicate things with recompiling
and writing locally on the user's machine, particularly when on newer
versions of Windows the installation directory might not be writable
anyway.

As long as executing from pyc files continues to work, presumably
py2exe can be updated to collect those files from any new cache
location during the build process.  But I do think it's useful to
continue to support executing them directly outside of any new cache
location, which it sounds like is the direction being taken.

-- David

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4