Yes – I know, there are better alternatives to IDLE out there, but I am used to it for quick and dirty changes to python files (I use eclipse + pydev for more serious work). And I am increasingly making the switch to Python 3. So when I double click on a py file, odds are I want to open it with IDLE for Python 3 not Python 2.
Start by making sure you have a desktop file like the following:
gksudo gedit /usr/share/applications/idle-python3.4.desktop
[Desktop Entry]
Name=IDLE (using Python-3.4)
Comment=Integrated Development Environment for Python (using Python-3.4)
Exec=/usr/bin/idle-python3.4
Icon=/usr/share/pixmaps/python3.4.xpm
Terminal=false
Type=Application
Categories=Application;Development;
StartupNotify=true
Then make the desktop entry the default for python files:
gedit ~/.local/share/application/mimeapps.list
[Default Applications]
text/w-python=idle-python3.4.desktop
Note – no trailing semi-colon.
And in Linux Mint:
Linux Mint:
ls /usr/share/applications/
identify appropriate .desktop file
gedit /usr/share/applications/defaults.list
add the appropriate .desktop file reference at the front of the python line as appropriate.
