[Python-Dev] __file__

Floris Bruynooghe floris.bruynooghe at gmail.com
Sat Feb 27 18:35:02 CET 2010


On Sat, Feb 27, 2010 at 10:56:13AM -0500, Barry Warsaw wrote:
> On Feb 26, 2010, at 10:59 PM, Michael Foord wrote:
> 
> >There are several companies who currently ship bytecode only. (There was 
> >someone on the IronPython mailing list only last week asking if 
> >IronPython could support pyc files for this reason). For many 
> >pointy-haired-bosses 'some' protection is enough and having Python not 
> >support this (out of the box) would be a black mark against Python for them.
> 
> Would it not be better to ship a zip file with an obfuscated name?  Doesn't
> that satisfy the use case nicely?

Sure, we combine that with putting .pyo files inside the zipfile tough
(for assert statements and if __debug__ blocks).  I'm rather confused
about everything proposed by now but would that keep working?

Also somewhere else in the thread it seemed like both you and Guido
suggested that simply creating a directory with some .pyc (or .pyo I
guess) files in would keep working, just by default they won't be
written there by python.  Or is it that functionality some want to cut
because of the doubling of the stat calls?  (But even then I'm not
convinced that would double the stat calls for normal users, only for
those who only ship .pyc files)

Regards
Floris

-- 
Debian GNU/Linux -- The Power of Freedom
www.debian.org | www.gnu.org | www.kernel.org


More information about the Python-Dev mailing list