{"id":1711,"date":"2019-04-30T02:57:58","date_gmt":"2019-04-30T10:57:58","guid":{"rendered":"http:\/\/wonghoi.humgar.com\/blog\/?p=1711"},"modified":"2025-12-01T04:21:40","modified_gmt":"2025-12-01T12:21:40","slug":"picking-an-ide-for-python","status":"publish","type":"post","link":"https:\/\/wonghoi.humgar.com\/blog\/2019\/04\/30\/picking-an-ide-for-python\/","title":{"rendered":"Picking an IDE for Python"},"content":{"rendered":"\n<p>The native features in MATLAB are often very good most of the time, as I&#8217;ve yet to hear anybody spending time to shop for a IDE outside the official one.<\/p>\n\n\n\n<p>Atom has the feel of Maple\/MathCAD, and Jupyter Notebook has the feel of Mathematica. Spyder feels like MATLAB the most, but it&#8217;s hugely primitive.<\/p>\n\n\n\n<p>IDLE is more miserable than a command prompt.&nbsp;It doesn&#8217;t even have the decency to recall command history with up arrow. It&#8217;s like freaking DOS before loading doskey.com. Not to mention that single clicking on the window won&#8217;t set the cursor to the active command line, which you have to scroll all the way down to click on the bottom line. WTF! I&#8217;d rather use the command prompt and give up meaningless syntax coloring.<\/p>\n\n\n\n<p>IPython (in Spyder) is unbearably slow (compare to MATLAB&#8217;s editor which I consider slow to the extent that it&#8217;s marginally bearable for the interactive features it offers), but at least usable unlike IDLE, and most importantly the output display is pprint (pretty printer) formatted so it&#8217;s legible. Just type locals() and see what kind of sh*t Python spits out in IDLE\/cmd.exe and you&#8217;ll see what I meant.<\/p>\n\n\n\n<p>I simply cannot live without <code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">who<\/code>\/<code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">whos<\/code> provided in IPython, but I still don&#8217;t like it showing the accessible functions\/modules along with the variables (I know, Python doesn&#8217;t tell them apart). Nonetheless it&#8217;s still weak because these are automagics that doesn&#8217;t return the results as Python data (just print). Spyder&#8217;s &#8216;variable explorer&#8217; is the only place I can find that doesn&#8217;t include loaded functions\/modules. Python should have provided facilities to get the user-introduced variables exclusively and leave the modules to a different function like MATLAB&#8217;s <code class=\"EnlighterJSRAW\" data-enlighter-language=\"matlab\">import<\/code> command that shows imported packages\/classes.<\/p>\n\n\n\n<p>However, pretty printer doesn&#8217;t even come close to MATLAB in terms of the amount of dirty work ` did to format the text to make it easy to read. Keys in the dictionary shown in pretty printer in Python are not right-aligned like MATLAB struct so we can easily tell keys and values apart. For example:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">MATLAB struct shows:\n          name: 'S'\n          size: [9 1]\n         bytes: 7765\n         class: 'struct'\n        global: 0\n        sparse: 0\n       complex: 0\n       nesting: [1\u00d71 struct]\n    persistent: 0\n\nPython with Pretty Printer shows:\n{'__name__': '__main__',\n '__doc__': 'Automatically created module for IPython interactive environment',\n '__package__': None,\n '__loader__': None,\n '__spec__': None,\n '__builtin__': &lt;module 'builtins' (built-in)>,\n '__builtins__': &lt;module 'builtins' (built-in)>,\n '_ih': ['', 'locals()'],\n '_oh': {},\n '_dh': ['C:\\\\Users\\\\Administrator'],\n 'In': ['', 'locals()'],\n 'Out': {},\n 'get_ipython': &lt;bound method InteractiveShell.get_ipython of &lt;ipykernel.zmqshell.ZMQInteractiveShell object at 0x00000000059B7828>>,\n 'exit': &lt;IPython.core.autocall.ZMQExitAutocall at 0x5a3b198>,\n 'quit': &lt;IPython.core.autocall.ZMQExitAutocall at 0x5a3b198>,\n '_': '',\n '__': '',\n '___': '',\n '_i': '',\n '_ii': '',\n '_iii': '',\n '_i1': 'locals()'}<\/pre>\n\n\n\n<p>I often convert things to MATLAB <code class=\"EnlighterJSRAW\" data-enlighter-language=\"matlab\">dataset()<\/code> because the <code class=\"EnlighterJSRAW\" data-enlighter-language=\"matlab\">disp()<\/code> method is excellent, such as <code class=\"EnlighterJSRAW\" data-enlighter-language=\"matlab\">struct2dataset(ver())<\/code>. <code class=\"EnlighterJSRAW\" data-enlighter-language=\"matlab\">table\/disp()<\/code> is nice, but I think they overdid it by defaulting to fancy rich-text that bold the header, which makes it a magnitude of orders slower, and it&#8217;s not using the limited visual space effectively to show more data. Python still has a lot more to do in the user-friendly department.<\/p>\n<div class=\"pvc_clear\"><\/div><p id=\"pvc_stats_1711\" class=\"pvc_stats all  \" data-element-id=\"1711\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/wonghoi.humgar.com\/blog\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p><div class=\"pvc_clear\"><\/div>","protected":false},"excerpt":{"rendered":"<p>The native features in MATLAB are often very good most of the time, as I&#8217;ve yet to hear anybody spending time to shop for a IDE outside the official one. Atom has the feel of Maple\/MathCAD, and Jupyter Notebook has &hellip; <a href=\"https:\/\/wonghoi.humgar.com\/blog\/2019\/04\/30\/picking-an-ide-for-python\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_1711\" class=\"pvc_stats all  \" data-element-id=\"1711\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/wonghoi.humgar.com\/blog\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[6,34],"tags":[],"class_list":["post-1711","post","type-post","status-publish","format-standard","hentry","category-note-to-self","category-python"],"_links":{"self":[{"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/posts\/1711","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/comments?post=1711"}],"version-history":[{"count":6,"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/posts\/1711\/revisions"}],"predecessor-version":[{"id":6806,"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/posts\/1711\/revisions\/6806"}],"wp:attachment":[{"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/media?parent=1711"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/categories?post=1711"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/tags?post=1711"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}