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

Steve D'Aprano steve+python at pearwood.info
Sat Dec 9 20:56:16 EST 2017


On Fri, 8 Dec 2017 12:08 pm, Python wrote:

> But more importantly, practically speaking, it still doesn't really
> provide much more help to the OP than Lawrence's answer.

I wasn't responding to the OP, I was responding to Lawrence. If I had a
solution for the OP beyond what others have already said (especially Thomas
Jollans' link to an AskUbuntu post), I would have given it.

Practically speaking, your responses to me don't help the OP either, do they?
So why single me out for criticism for *exactly* the same thing that you
yourself are doing?


> He may well 
> know already that the desktop environment is what does the job (and
> probably does even, in broad terms, if he's familiar with computers in
> general), but have no idea how to configure it.

Anything is possible, but if he were that clueful, he would know that this has
nothing to do with Python and he should be asking in a forum dedicated to his
preferred desktop environment. The fact that this is a Python script is
irrelevant.


> A reasonably helpful 
> answer would be one that mentioned a few of the likely possibilities
> (Gnome, KDE, Unity, /etc/mime.types, "other"), and gave hints for how
> to find out the answer for each.  A thoroughly helpful answer would
> be, well, outside the scope of this list/group.

Arguably -- and I'm not sure that I personally would take this position -- it
might be said that somebody clueless enough to ask a desktop-specific
question without specifying which desktop he is running, would only be
confused rather than enlightened by an answer which lists three or more
desktops.

If we take a user-centric position, there's a lot to be said for the
attitude "Don't bother me with technical details, I just want to make the
file executable when I double-click on it".

(I presume that there's a single, trivial, right answer to this question on
Mac OS and Windows.)


> Pedantry has its place, FWIW. In the computer field, as with other
> science and engineering disciplines, often precision is much more
> essential than in other fields.  I personally find such precision is
> especially warranted if you take it upon yourself to criticize what
> someone else has said.

There's a famous story where some English Lit student took it upon themselves
to criticise Isaac Asimov for his claim to be living in a century where we
finally knew the basics of how the universe worked. Asimov's response was to
quote something he had once told his editor, John Campbell:

    [W]hen people thought the earth was flat, they were wrong. When people
    thought the earth was spherical, they were wrong. But if you think that
    thinking the earth is spherical is just as wrong as thinking the earth
    is flat, then your view is wronger than both of them put together.

http://hermiene.net/essays-trans/relativity_of_wrong.html

https://en.wikipedia.org/wiki/Wronger_than_wrong

(This is becoming ever more relevant again, as for some reason -- possibly
Poe's Law -- the number of people on the Internet claiming to believe the
world is flat is on the rise.)

If you think that my statement is just as wrong as Lawrence's statement,
you're wronger than both of us together :-)


Remember the context here: we're replying to a thread discussing somebody who
is running Ubuntu with a GUI desktop environment. Of course there are *some*
Linux systems which don't run a GUI at all, but you can't double-click on
files on such systems, and they aren't Ubuntu, so they aren't relevant.


> Though, providing such precision via natural 
> language often turns out to be more challenging than one would hope...

Indeed.




-- 
Steve
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.




More information about the Python-list mailing list