Running a Python file

Pete Vander Giessen petevg at
Wed Jul 7 01:13:18 UTC 2010

On Tue, Jul 6, 2010 at 5:36 PM, Jim Byrnes <jf_byrnes at> wrote:
> I have been teaching myself Python.  Running some of my programs and
> others examples I noticed that some I could run by double-clicking them
> and others I could not.  Looking at the file permissions I saw that they
> were different.  Then I noticed that all the ones I could not run were
> ones I gone into Properties-->Permissions and check execute as a
> program.  Once I unchecked it they worked.
> This seems backwards to me.  Could someone tell me why this works this way?

Hi Jim,

That _is_ backwards.  What do you mean by "run"?  The default behavior
in Ubuntu, when you double-click an executable script, is to prompt
whether you want to "display", cancel, or run the script.  The default
behavior for a non-executable script is to open it up in your default
text editor.

I'm guessing that you are using an IDE to write your Python, and when
you double click a non-executable file, it opens it up in the IDE, and
then your IDE executes it.  When you double-click an executable file
on the other hand, it is simply executing it and exiting, too fast for
you to notice.  Does this sound plausible?

Regardless, have fun with Python.  It's an excellent language, and
generally a pleasure to code.


" ... the original aphorism being 'In comparison with the ancients, we
stand like dwarfs on the shoulders of giants.' The image was a
commonplace by the time Newton used it, his one contribution being to
erase any sense that he himself might be a dwarf."

~ Lewis Hyde

More information about the ubuntu-users mailing list