{"id":1214,"date":"2014-08-23T19:31:12","date_gmt":"2014-08-23T07:31:12","guid":{"rendered":"http:\/\/p-s.co.nz\/wordpress\/?p=1214"},"modified":"2014-09-02T22:37:24","modified_gmt":"2014-09-02T10:37:24","slug":"idle3-as-default-for-py-files-on-ubuntu","status":"publish","type":"post","link":"http:\/\/p-s.co.nz\/wordpress\/idle3-as-default-for-py-files-on-ubuntu\/","title":{"rendered":"IDLE3 as default for py files on Ubuntu"},"content":{"rendered":"<p>Yes &#8211; 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.<\/p>\n<p>Start by making sure you have a desktop file like the following:<\/p>\n<p><code>gksudo gedit \/usr\/share\/applications\/idle-python3.4.desktop<\/p>\n<p>[Desktop Entry]<br \/>\nName=IDLE (using Python-3.4)<br \/>\nComment=Integrated Development Environment for Python (using Python-3.4)<br \/>\n<strong>Exec=\/usr\/bin\/idle-python3.4<\/strong><br \/>\nIcon=\/usr\/share\/pixmaps\/python3.4.xpm<br \/>\nTerminal=false<br \/>\nType=Application<br \/>\nCategories=Application;Development;<br \/>\nStartupNotify=true<\/code><br \/>\nThen make the desktop entry the default for python files:<br \/>\n<code><br \/>\ngedit ~\/.local\/share\/application\/mimeapps.list<\/p>\n<p>[Default Applications]<br \/>\n<strong>text\/w-python=idle-python3.4.desktop<\/strong><br \/>\n<\/code><\/p>\n<p>Note &#8211; no trailing semi-colon.<\/p>\n<p>And in Linux Mint:<\/p>\n<p>Linux Mint:<\/p>\n<p><code>ls \/usr\/share\/applications\/<\/code><\/p>\n<p>identify appropriate .desktop file<\/p>\n<p><code>gedit \/usr\/share\/applications\/defaults.list<\/code><\/p>\n<p>add the appropriate .desktop file reference at the front of the python line as appropriate.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Yes &#8211; 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 &hellip; <a href=\"http:\/\/p-s.co.nz\/wordpress\/idle3-as-default-for-py-files-on-ubuntu\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,3,6],"tags":[],"class_list":["post-1214","post","type-post","status-publish","format-standard","hentry","category-programming","category-python","category-ubuntu"],"_links":{"self":[{"href":"http:\/\/p-s.co.nz\/wordpress\/wp-json\/wp\/v2\/posts\/1214"}],"collection":[{"href":"http:\/\/p-s.co.nz\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/p-s.co.nz\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/p-s.co.nz\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/p-s.co.nz\/wordpress\/wp-json\/wp\/v2\/comments?post=1214"}],"version-history":[{"count":6,"href":"http:\/\/p-s.co.nz\/wordpress\/wp-json\/wp\/v2\/posts\/1214\/revisions"}],"predecessor-version":[{"id":1220,"href":"http:\/\/p-s.co.nz\/wordpress\/wp-json\/wp\/v2\/posts\/1214\/revisions\/1220"}],"wp:attachment":[{"href":"http:\/\/p-s.co.nz\/wordpress\/wp-json\/wp\/v2\/media?parent=1214"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/p-s.co.nz\/wordpress\/wp-json\/wp\/v2\/categories?post=1214"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/p-s.co.nz\/wordpress\/wp-json\/wp\/v2\/tags?post=1214"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}