{"id":1213,"date":"2014-01-16T10:42:52","date_gmt":"2014-01-16T10:42:52","guid":{"rendered":"http:\/\/blog.filipesaraiva.info\/?p=1213"},"modified":"2014-01-16T12:23:30","modified_gmt":"2014-01-16T12:23:30","slug":"cantor-python-2-backend-feature-tour","status":"publish","type":"post","link":"https:\/\/filipe.saraiva.tec.br\/blog\/?p=1213","title":{"rendered":"Cantor: Python 2 backend feature tour"},"content":{"rendered":"<h2 style=\"text-align: justify;\">Introduction<\/h2>\n<p style=\"text-align: center;\"><a href=\"http:\/\/blog.filipesaraiva.info\/wp-content\/uploads\/2013\/12\/python2_select.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1192\" data-permalink=\"https:\/\/filipe.saraiva.tec.br\/blog\/?attachment_id=1192\" data-orig-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_select.png\" data-orig-size=\"613,330\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"python2_select\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_select-300x161.png\" data-large-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_select.png\" class=\"aligncenter size-full wp-image-1192\" alt=\"python2_select\" src=\"http:\/\/blog.filipesaraiva.info\/wp-content\/uploads\/2013\/12\/python2_select.png\" width=\"613\" height=\"330\" srcset=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_select.png 613w, https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_select-300x161.png 300w\" sizes=\"auto, (max-width: 613px) 100vw, 613px\" \/><\/a><em>Cantor backend selection screen<\/em><\/p>\n<p style=\"text-align: justify;\">In 2013 I developed a <a href=\"http:\/\/blog.filipesaraiva.info\/?tag=gsoc2013-python-backend\" target=\"_blank\">Python 2 backend<\/a> for <a href=\"http:\/\/edu.kde.org\/cantor\/\" target=\"_blank\">Cantor<\/a>, a project funded in part by <a href=\"http:\/\/blog.filipesaraiva.info\/?p=1081\" target=\"_blank\">Google Summer of Code<\/a>. Now this backend is available in Cantor released in <a href=\"http:\/\/kde.org\/announcements\/4.12\/\" target=\"_blank\">KDE 4.12<\/a>.<\/p>\n<p style=\"text-align: justify;\">Cantor is a mathematical\/scientific programming software, a frontend providing IDE features (syntax highlighting, tab-complete, variables management, and more) and a advanced terminal. Cantor support a lot of mathematical engines like Octave, Sage, Maxima, Kalgebra, Qualculate, R, Scilab (<a href=\"http:\/\/blog.filipesaraiva.info\/?tag=gsoc2011-scilab-backend\" target=\"_blank\">developed by me<\/a> too), and now, Python 2. You can see Cantor as a Matlab-like software, but it uses other mathematical environment\/software as programming language.<\/p>\n<p style=\"text-align: justify;\">This post I will do a &#8220;feature tour&#8221; in Python 2 backend to show Cantor software for scientific python developers community.<\/p>\n<h2 style=\"text-align: justify;\">Initial Screen &#8211; Syntax Highlighting and Tab Complete<\/h2>\n<p style=\"text-align: center;\"><a href=\"http:\/\/blog.filipesaraiva.info\/wp-content\/uploads\/2013\/12\/python2_initialscreen.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1193\" data-permalink=\"https:\/\/filipe.saraiva.tec.br\/blog\/?attachment_id=1193\" data-orig-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_initialscreen.png\" data-orig-size=\"1366,737\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"python2_initialscreen\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_initialscreen-300x161.png\" data-large-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_initialscreen-1024x552.png\" class=\"aligncenter size-large wp-image-1193\" alt=\"python2_initialscreen\" src=\"http:\/\/blog.filipesaraiva.info\/wp-content\/uploads\/2013\/12\/python2_initialscreen-1024x552.png\" width=\"698\" height=\"375\" srcset=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_initialscreen-1024x552.png 1024w, https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_initialscreen-300x161.png 300w\" sizes=\"auto, (max-width: 698px) 100vw, 698px\" \/><\/a><em>Cantor initial screen<br \/>\n<\/em><\/p>\n<p style=\"text-align: justify;\">After select the Python 2 backend, Cantor will show the initial screen. This window have a big widget for the Python 2 terminal, and two side panels &#8211; one to show the Python 2 help and the other to variables management.<\/p>\n<p style=\"text-align: justify;\">Let&#8217;s see some commands inputs in the terminal:<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/blog.filipesaraiva.info\/wp-content\/uploads\/2013\/12\/python2_syntax.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1194\" data-permalink=\"https:\/\/filipe.saraiva.tec.br\/blog\/?attachment_id=1194\" data-orig-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_syntax.png\" data-orig-size=\"1366,737\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"python2_syntax\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_syntax-300x161.png\" data-large-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_syntax-1024x552.png\" class=\"aligncenter size-large wp-image-1194\" alt=\"python2_syntax\" src=\"http:\/\/blog.filipesaraiva.info\/wp-content\/uploads\/2013\/12\/python2_syntax-1024x552.png\" width=\"698\" height=\"375\" srcset=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_syntax-1024x552.png 1024w, https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_syntax-300x161.png 300w\" sizes=\"auto, (max-width: 698px) 100vw, 698px\" \/><\/a><em>Syntax highlithing<br \/>\n<\/em><\/p>\n<p style=\"text-align: justify;\">Cantor is highlighting the Python 2 syntax and, in side panel, you can see the variables created.<\/p>\n<p style=\"text-align: justify;\">Now, let&#8217;s create new variables with similar names to test the tab complete. See the picture below:<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/blog.filipesaraiva.info\/wp-content\/uploads\/2013\/12\/python2_complete.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1195\" data-permalink=\"https:\/\/filipe.saraiva.tec.br\/blog\/?attachment_id=1195\" data-orig-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_complete.png\" data-orig-size=\"1366,737\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"python2_complete\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_complete-300x161.png\" data-large-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_complete-1024x552.png\" class=\"aligncenter size-large wp-image-1195\" alt=\"python2_complete\" src=\"http:\/\/blog.filipesaraiva.info\/wp-content\/uploads\/2013\/12\/python2_complete-1024x552.png\" width=\"698\" height=\"375\" srcset=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_complete-1024x552.png 1024w, https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_complete-300x161.png 300w\" sizes=\"auto, (max-width: 698px) 100vw, 698px\" \/><\/a><em>Tab complete for variables<br \/>\n<\/em><\/p>\n<p style=\"text-align: justify;\">After create variables <em>variable_x<\/em>, <em>variable_y<\/em> e <em>variable_var<\/em>, we can write in terminal <em>var<\/em> and type tab key twice &#8211; Cantor will show the variables and functions with the same piece of word. Tab complete is available for module functions too.<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/blog.filipesaraiva.info\/wp-content\/uploads\/2013\/12\/python2_complete2.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1196\" data-permalink=\"https:\/\/filipe.saraiva.tec.br\/blog\/?attachment_id=1196\" data-orig-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_complete2.png\" data-orig-size=\"1366,737\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"python2_complete2\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_complete2-300x161.png\" data-large-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_complete2-1024x552.png\" class=\"aligncenter size-large wp-image-1196\" alt=\"python2_complete2\" src=\"http:\/\/blog.filipesaraiva.info\/wp-content\/uploads\/2013\/12\/python2_complete2-1024x552.png\" width=\"698\" height=\"375\" srcset=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_complete2-1024x552.png 1024w, https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_complete2-300x161.png 300w\" sizes=\"auto, (max-width: 698px) 100vw, 698px\" \/><\/a><em>Tab complete for module functions<br \/>\n<\/em><\/p>\n<p style=\"text-align: justify;\">Cantor show error messages in terminal too. Next figure show a import error:<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/blog.filipesaraiva.info\/wp-content\/uploads\/2013\/12\/python2_error.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1197\" data-permalink=\"https:\/\/filipe.saraiva.tec.br\/blog\/?attachment_id=1197\" data-orig-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_error.png\" data-orig-size=\"1366,737\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"python2_error\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_error-300x161.png\" data-large-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_error-1024x552.png\" class=\"aligncenter size-large wp-image-1197\" alt=\"python2_error\" src=\"http:\/\/blog.filipesaraiva.info\/wp-content\/uploads\/2013\/12\/python2_error-1024x552.png\" width=\"698\" height=\"375\" srcset=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_error-1024x552.png 1024w, https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_error-300x161.png 300w\" sizes=\"auto, (max-width: 698px) 100vw, 698px\" \/><\/a><em>Error message<br \/>\n<\/em><\/p>\n<p style=\"text-align: justify;\">You can save the terminal state or just the input commands and their outputs in a file. Cantor allows upload\/download a terminal example for a remote server. You can explore this features in <em>&#8220;File<\/em>&#8221; menu.<\/p>\n<h2 style=\"text-align: justify;\">Help Panel<\/h2>\n<p style=\"text-align: justify;\">Cantor shows Python help from\u00a0<em>help<\/em> command in a side panel. The picture below shows the help for <em>complex<\/em> class:<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/blog.filipesaraiva.info\/wp-content\/uploads\/2013\/12\/python2_help.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1198\" data-permalink=\"https:\/\/filipe.saraiva.tec.br\/blog\/?attachment_id=1198\" data-orig-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_help.png\" data-orig-size=\"382,648\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"python2_help\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_help-176x300.png\" data-large-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_help.png\" class=\"aligncenter size-full wp-image-1198\" alt=\"python2_help\" src=\"http:\/\/blog.filipesaraiva.info\/wp-content\/uploads\/2013\/12\/python2_help.png\" width=\"382\" height=\"648\" srcset=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_help.png 382w, https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_help-176x300.png 176w\" sizes=\"auto, (max-width: 382px) 100vw, 382px\" \/><\/a><em>Help panel<br \/>\n<\/em><\/p>\n<p style=\"text-align: justify;\">Cantor uses Qt\/KDE technologies, so you can change the window format moving the side panels. Next picture show the window with the variables management in the left side and the help panel in the right side.<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/blog.filipesaraiva.info\/wp-content\/uploads\/2013\/12\/python2_help_complete.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1199\" data-permalink=\"https:\/\/filipe.saraiva.tec.br\/blog\/?attachment_id=1199\" data-orig-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_help_complete.png\" data-orig-size=\"1366,737\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"python2_help_complete\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_help_complete-300x161.png\" data-large-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_help_complete-1024x552.png\" class=\"aligncenter size-large wp-image-1199\" alt=\"python2_help_complete\" src=\"http:\/\/blog.filipesaraiva.info\/wp-content\/uploads\/2013\/12\/python2_help_complete-1024x552.png\" width=\"698\" height=\"375\" srcset=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_help_complete-1024x552.png 1024w, https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_help_complete-300x161.png 300w\" sizes=\"auto, (max-width: 698px) 100vw, 698px\" \/><\/a><em>Panels in different sides<\/em><\/p>\n<h2 style=\"text-align: justify;\">Variables Management<\/h2>\n<p style=\"text-align: center;\"><a href=\"http:\/\/blog.filipesaraiva.info\/wp-content\/uploads\/2013\/12\/python2_variables.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1200\" data-permalink=\"https:\/\/filipe.saraiva.tec.br\/blog\/?attachment_id=1200\" data-orig-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_variables.png\" data-orig-size=\"310,648\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"python2_variables\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_variables-143x300.png\" data-large-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_variables.png\" class=\"aligncenter size-full wp-image-1200\" alt=\"python2_variables\" src=\"http:\/\/blog.filipesaraiva.info\/wp-content\/uploads\/2013\/12\/python2_variables.png\" width=\"310\" height=\"648\" srcset=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_variables.png 310w, https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_variables-143x300.png 143w\" sizes=\"auto, (max-width: 310px) 100vw, 310px\" \/><\/a><em> Variables management panel<\/em><\/p>\n<p style=\"text-align: justify;\">Variables management panel shows the variables created in Cantor session, showing their labels and values. The panel have some additional functions too, in buttons bottom the widget. These functions are, from left to right, <em>Add variable<\/em>,\u00a0<em>Load variables<\/em>, <em>Save variables<\/em>, and <em>Clear all variables<\/em>.<\/p>\n<p style=\"text-align: justify;\"><em>Add<\/em><em> variable<\/em> just open a pop-up window to input a label and a value to a variable.<\/p>\n<p style=\"text-align: justify;\"><em>Load variables<\/em> and <em>Save variables<\/em> uses <a href=\"http:\/\/docs.python.org\/2\/library\/shelve.html\" target=\"_blank\">shelve<\/a> module to data persistence. When the buttons are clicked, Cantor loads scripts to, in first case, read and load variables to the session, and, in second case, save the python dictionary in a file. The figures below show this operations:<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/blog.filipesaraiva.info\/wp-content\/uploads\/2013\/12\/python2_save_variables.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1202\" data-permalink=\"https:\/\/filipe.saraiva.tec.br\/blog\/?attachment_id=1202\" data-orig-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_save_variables.png\" data-orig-size=\"1366,737\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"python2_save_variables\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_save_variables-300x161.png\" data-large-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_save_variables-1024x552.png\" class=\"aligncenter size-large wp-image-1202\" alt=\"python2_save_variables\" src=\"http:\/\/blog.filipesaraiva.info\/wp-content\/uploads\/2013\/12\/python2_save_variables-1024x552.png\" width=\"698\" height=\"375\" srcset=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_save_variables-1024x552.png 1024w, https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_save_variables-300x161.png 300w\" sizes=\"auto, (max-width: 698px) 100vw, 698px\" \/><\/a><em>Saving variables<br \/>\n<\/em><\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/blog.filipesaraiva.info\/wp-content\/uploads\/2013\/12\/python2_load_variables.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1203\" data-permalink=\"https:\/\/filipe.saraiva.tec.br\/blog\/?attachment_id=1203\" data-orig-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_load_variables.png\" data-orig-size=\"1366,737\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"python2_load_variables\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_load_variables-300x161.png\" data-large-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_load_variables-1024x552.png\" class=\"aligncenter size-large wp-image-1203\" alt=\"python2_load_variables\" src=\"http:\/\/blog.filipesaraiva.info\/wp-content\/uploads\/2013\/12\/python2_load_variables-1024x552.png\" width=\"698\" height=\"375\" srcset=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_load_variables-1024x552.png 1024w, https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/12\/python2_load_variables-300x161.png 300w\" sizes=\"auto, (max-width: 698px) 100vw, 698px\" \/><\/a><em>Loading variables<br \/>\n<\/em><\/p>\n<p style=\"text-align: justify;\">The function <em>Clear all variables <\/em> delete each variable from Python dictionary. The code is below:<\/p>\n<h2 style=\"text-align: justify;\"><a href=\"http:\/\/blog.filipesaraiva.info\/wp-content\/uploads\/2013\/09\/python_backend_variable_management_usecase6.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1124\" data-permalink=\"https:\/\/filipe.saraiva.tec.br\/blog\/?attachment_id=1124\" data-orig-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/09\/python_backend_variable_management_usecase6.png\" data-orig-size=\"913,81\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"python_backend_variable_management_usecase6\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/09\/python_backend_variable_management_usecase6-300x26.png\" data-large-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/09\/python_backend_variable_management_usecase6.png\" class=\"aligncenter size-full wp-image-1124\" alt=\"python_backend_variable_management_usecase6\" src=\"http:\/\/blog.filipesaraiva.info\/wp-content\/uploads\/2013\/09\/python_backend_variable_management_usecase6.png\" width=\"913\" height=\"81\" srcset=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/09\/python_backend_variable_management_usecase6.png 913w, https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/09\/python_backend_variable_management_usecase6-300x26.png 300w\" sizes=\"auto, (max-width: 913px) 100vw, 913px\" \/><\/a>Graphics<\/h2>\n<p style=\"text-align: center;\"><a href=\"http:\/\/blog.filipesaraiva.info\/wp-content\/uploads\/2013\/09\/python_command_to_plot.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1143\" data-permalink=\"https:\/\/filipe.saraiva.tec.br\/blog\/?attachment_id=1143\" data-orig-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/09\/python_command_to_plot.png\" data-orig-size=\"1366,737\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"python_command_to_plot\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/09\/python_command_to_plot-300x161.png\" data-large-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/09\/python_command_to_plot-1024x552.png\" class=\"aligncenter size-large wp-image-1143\" alt=\"python_command_to_plot\" src=\"http:\/\/blog.filipesaraiva.info\/wp-content\/uploads\/2013\/09\/python_command_to_plot-1024x552.png\" width=\"698\" height=\"375\" srcset=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/09\/python_command_to_plot-1024x552.png 1024w, https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/09\/python_command_to_plot-300x161.png 300w\" sizes=\"auto, (max-width: 698px) 100vw, 698px\" \/><\/a><em>Code for graphic creation using matplotlib<\/em><\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/blog.filipesaraiva.info\/wp-content\/uploads\/2013\/09\/python_plot_result.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1142\" data-permalink=\"https:\/\/filipe.saraiva.tec.br\/blog\/?attachment_id=1142\" data-orig-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/09\/python_plot_result.png\" data-orig-size=\"1366,737\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"python_plot_result\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/09\/python_plot_result-300x161.png\" data-large-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/09\/python_plot_result-1024x552.png\" class=\"aligncenter size-large wp-image-1142\" alt=\"python_plot_result\" src=\"http:\/\/blog.filipesaraiva.info\/wp-content\/uploads\/2013\/09\/python_plot_result-1024x552.png\" width=\"698\" height=\"375\" srcset=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/09\/python_plot_result-1024x552.png 1024w, https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2013\/09\/python_plot_result-300x161.png 300w\" sizes=\"auto, (max-width: 698px) 100vw, 698px\" \/><\/a><em>Graphic loaded in Cantor<br \/>\n<\/em><\/p>\n<p style=\"text-align: justify;\">The figures below show the graphic loaded in Cantor worksheet. When a session is exported, the graphic will be exported too. This feature can be configured to create the graphics in a new window &#8211; this is the default option.<\/p>\n<h2 style=\"text-align: justify;\">Conclusion and Future<\/h2>\n<p style=\"text-align: justify;\">This is the first stable version of Python 2 support in Cantor. It is working good, but you can see the bug presence in some parts of software.<\/p>\n<p style=\"text-align: justify;\">I would like to see some feedbacks from mathematical\/scientific programming python community. I am not a &#8220;pythonist&#8221;, so the python community can find bugs and strange behaviours in the software better than me. I would like to see some feature suggestions too.<\/p>\n<p style=\"text-align: justify;\">For the next version, Python 2 backend will have support to script editor &#8211; unfortunately, I can not develop it for this release.<\/p>\n<p style=\"text-align: justify;\">If you are interested in the backend development, my blog have a <a href=\"http:\/\/blog.filipesaraiva.info\/?tag=gsoc2013-python-backend\" target=\"_blank\">set of posts<\/a> (in Portuguese and English) about it. You can download the source code in <a href=\"https:\/\/projects.kde.org\/projects\/kde\/kdeedu\/cantor\/repository\/\" target=\"_blank\">Cantor repository<\/a> &#8211; the license is GPLv2. And you can submit a bug report in <a href=\"http:\/\/bugs.kde.org\/\" target=\"_blank\">KDE bugzilla<\/a>.<\/p>\n<p style=\"text-align: justify;\">And you can contact me in comments area below or in my mail address filipe at kde.org.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Cantor backend selection screen In 2013 I developed a Python 2 backend for Cantor, a project funded in part by Google Summer of Code. Now this backend is available in Cantor released in KDE 4.12. Cantor is a mathematical\/scientific programming software, a frontend providing IDE features (syntax highlighting, tab-complete, variables management, and more) and&hellip;&nbsp;<a href=\"https:\/\/filipe.saraiva.tec.br\/blog\/?p=1213\" class=\"\" rel=\"bookmark\">Continue a ler &raquo;<span class=\"screen-reader-text\">Cantor: Python 2 backend feature tour<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[9],"tags":[58,11,26,51,109,104,41,52,108,80],"class_list":["post-1213","post","type-post","status-publish","format-standard","hentry","category-software-livre","tag-cantor","tag-desenvolvimento","tag-kde","tag-planet-mageia-english","tag-planet-python","tag-planet-scipy","tag-planeta-psl-pi","tag-planetkde-english","tag-python","tag-python-backend"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1p2Jh-jz","jetpack_sharing_enabled":true,"jetpack_likes_enabled":false,"_links":{"self":[{"href":"https:\/\/filipe.saraiva.tec.br\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1213","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/filipe.saraiva.tec.br\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/filipe.saraiva.tec.br\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/filipe.saraiva.tec.br\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/filipe.saraiva.tec.br\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1213"}],"version-history":[{"count":1,"href":"https:\/\/filipe.saraiva.tec.br\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1213\/revisions"}],"predecessor-version":[{"id":1215,"href":"https:\/\/filipe.saraiva.tec.br\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1213\/revisions\/1215"}],"wp:attachment":[{"href":"https:\/\/filipe.saraiva.tec.br\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1213"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/filipe.saraiva.tec.br\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1213"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/filipe.saraiva.tec.br\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1213"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}