Please tell me how to execute python file in Ubuntu by double

Chris Angelico rosuav at gmail.com
Mon Dec 11 20:57:59 EST 2017


On Tue, Dec 12, 2017 at 12:37 PM, Rustom Mody <rustompmody at gmail.com> wrote:
>
> This thread is getting like a mini hologram of our current surreal time…
> If we can put aside who is right and wrong for a moment we see the more
> frightening spectacle that Repubs and democrats, Remainers and Brexiters and so
> on all over — by getting more and more shrill are not talking to each other but
> past each other
>
> So…
>
> On Tuesday, December 12, 2017 at 2:45:32 AM UTC+5:30, Rick Johnson wrote:
>> Rustom Mody wrote:
>>
>> [...]
>>
>> > Whether there was nothing wrong in what I did, the "wrong-
>> > right" was de facto, or de jureâ | I will leave to more wise
>> > persons than myself
>>
>> A file with no extension (regardless of the OS or desktop enviroment that it
>> was created on), is like a sealed box with no label to indicate the contents.
>
> So to Rick:
>
> Not if you use something like file (magic)
> My (unschooled) estimate is it gets its detection right 80% of the time
>
> And to Chris and others who think file(magic) is a replacement for file-associations. Even assuming that magic works 100% :
>
> Say I have an html file.
> That means its ALSO a text file.
> So its equally legitimate to set defaults to use…
> - a plain text editor (of which there are hundreds)
> - to open it in browser of choice (also plural nowadays)
> - some sort of html composer
> - etc
>
> Which means we are beyond the nature of the file per se to the pattern of its usage
>
> Yeah… magic… in the category of mind-reading? sooth-saying?

Which is why OS/2, back in the 1990s, had *multiple* associations for
any given file. You could use file types (sadly not MIME types - this
was before MIME was the one obvious standard to use) to identify *any
number* of programs that are likely to be used with a file, and then
one of them is the global default. For any specific file, you can
change which program is its own default, and even add specific
associations for that individual file. When you double-click, you get
the default; if you right-click and choose "Open", you could pick from
the associated programs. A good system, and one that I still haven't
seen replicated in a mainstream OS.

ChrisA



More information about the Python-list mailing list