Please tell me how to execute python file in Ubuntu by double clicking on file. (Posting On Python-List Prohibited)

Chris Angelico rosuav at gmail.com
Sun Dec 10 22:47:35 EST 2017


On Mon, Dec 11, 2017 at 2:35 PM, Steve D'Aprano
<steve+python at pearwood.info> wrote:
> On Mon, 11 Dec 2017 11:29 am, Chris Angelico wrote:
>
>> On Mon, Dec 11, 2017 at 10:10 AM, Rick Johnson
>> <rantingrickjohnson at gmail.com> wrote:
>
>>> And it's not like we can just pick file up and shake
>>> it, in a crude attempt to intuit the contents.
>>
>> No, but fortunately we have magic. And magic can tell us a lot about
>> what a file contains.
>>
>> man 5 magic
>
> https://pypi.python.org/pypi/python-magic
>

Yep, that's an interface to the same magic I'm talking about. Wands,
scrolls, incantations, they're all just front ends to libmagic.

ChrisA



More information about the Python-list mailing list