On Wed, Feb 18, 2015 at 10:16 PM, Paul Moore <p.f.mo...@gmail.com> wrote: > On 18 February 2015 at 20:48, Jim J. Jewett <jimjjew...@gmail.com> wrote: >> Barry Warsaw wrote: >>>> I don't know exactly what the procedure would be to claim .pyz for *nix, >>>> e.g. updating /etc/mime.types, but I think the PEP should at least mention >>>> this. I think we want to get as official support for .pyz files on *nix as >>>> possible. >> >> Paul Moore wrote: >>> I'll add a note to the PEP, but I have no idea how we would even go >>> about that, so that's all I can do, unfortunately. >> >> Are you just looking for >> >> http://www.iana.org/assignments/media-types/media-types.xhtml >> >> and its references, including the registration procedures >> >> http://tools.ietf.org/html/rfc6838#section-4.2.5 >> >> and the application form at >> >> http://www.iana.org/form/media-types >> >> ? > > That covers mime types, but not file extensions, so it's not really > what *I* thought Barry was talking about. > > Actually, I guess the first question is whether ".py" is reserved for > Python scripts. If it is, then certainly /pyz should be reserved in a > similar way for Python Zip Applications. If there's no formal > registration of .py, then it seems a bit unreasonable to bother for > .pyz... > > Also, I don't think reserving anything is something I, as an > individual (and specifically a non-Unix user) should do. It probably > should be handled by the PSF, as the process seems to need a contact > email address...
There is no extension registry for Unixy systems, because extensions traditionally don't matter. File types are identified by their contents; there is a "magic"* database that maps file contents to types (MIME types, nowadays). The `file` command is the CLI interface for that. Some programs will fall back on the extension if that doesn't give a result, but that would depend on the program. For a pyz file to run when you "open" it (for most values of "open"), it needs to have the executable bit set, and have a shebang line. * /usr/share/misc/magic – it originally contained just magic numbers, such as those you might find at the beginning of a .pyc file. _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com