Please tell me how to execute python file in Ubuntu by double
Rick Johnson
rantingrickjohnson at gmail.com
Sun Dec 3 13:38:50 EST 2017
On Monday, December 4, 2017 at 3:49:11 AM UTC-6, dhananjays... at gmail.com wrote:
> I am Dhananjay Singh,Student of IIIT Manipur. Sir/Mam when
> i am double click in python program (Dhananjay.py),it is
> opening in Text Editor by Default in Ubuntu.I want to run
> this program when i double click on it as any *.Exe file
> executes as in Window. Sir please help me.
Sounds like your OS file associations are all botched-up and the ".py"
extention has been linked (either by you purposefully, as a system default, or
as the side-effect of something else) to a texteditor program. It's easy enough
to change this setting in the OS, and i believe there is a Python module or
two for the task -- if that's your cup-o-tea.
Granted, opening a text editor for unknown files is always a wise default
system setting as it avoids any exploits that may be initiated by a hapless
neophyte. Take, for example, the braindead Windozes default setting for
autorun, which has been the source of many nasty exploits. I suppose that Gates
figures his user base is so dumb that they can't even find the My Computer
icon and double click it in order to access the contents of a removable drive,
CD-ROM, or whatever STD riddled device they happen to plug in. The wise windoze
user knows that disabling autorun is paramount to ensuring a secure
experience, among other braindead defaults.
This is not really a "python" question, and is actually generally applicable to
Operating Systems. And the solution is specific to each platform.
More information about the Python-list
mailing list