{"id":296,"date":"2018-03-06T15:29:57","date_gmt":"2018-03-06T15:29:57","guid":{"rendered":"https:\/\/chaquo.com\/chaquopy\/?p=296"},"modified":"2018-03-06T17:28:33","modified_gmt":"2018-03-06T17:28:33","slug":"chaquopy-version-1-4-0","status":"publish","type":"post","link":"https:\/\/chaquo.com\/chaquopy\/chaquopy-version-1-4-0\/","title":{"rendered":"Chaquopy version 1.4.0"},"content":{"rendered":"<p>This version adds the following feature:<\/p>\n<ul class=\"simple\">\n<li>The Python standard library is now loaded from compiled .pyc files by default (see\u00a0<a class=\"reference internal\" href=\"android.html#android-bytecode\"><span class=\"std std-ref\">documentation<\/span><\/a>). As a result, startup of a minimal app is now 20-30% faster with Python 2, and 50-60% faster with Python 3. (Python 3 startup is still slower than Python 2, but only by 15-20%.)<\/li>\n<\/ul>\n<p>And fixes the following bugs:<\/p>\n<ul class=\"simple\">\n<li><code class=\"code docutils literal\"><span class=\"pre\">sys.stdin<\/span><\/code>\u00a0now returns EOF rather than blocking. If you want to run some code which takes interactive text input, see below for the new console app template.<\/li>\n<li>The\u00a0<code class=\"code docutils literal\"><span class=\"pre\">write<\/span><\/code>\u00a0method of\u00a0<code class=\"code docutils literal\"><span class=\"pre\">sys.stdout<\/span><\/code>\u00a0and\u00a0<code class=\"code docutils literal\"><span class=\"pre\">sys.stderr<\/span><\/code>\u00a0now returns the character count.<\/li>\n<li>Very long lines written to\u00a0<code class=\"code docutils literal\"><span class=\"pre\">sys.stdout<\/span><\/code>\u00a0and\u00a0<code class=\"code docutils literal\"><span class=\"pre\">sys.stderr<\/span><\/code>\u00a0are now split into slightly smaller fragments, to allow for the shorter Logcat message length limit in recent versions of Android.<\/li>\n<li>Fix a multi-threading deadlock.<\/li>\n<\/ul>\n<p>Other notes:<\/p>\n<ul>\n<li>Apps built with an unlicensed copy of the SDK are now limited to a run-time of 5 minutes.<\/li>\n<li>A\u00a0<a class=\"reference external\" href=\"https:\/\/github.com\/chaquo\/chaquopy-console\">console app template<\/a>\u00a0is now available, providing a framework for running text-based Python programs in an Android app. The\u00a0<a href=\"https:\/\/github.com\/chaquo\/chaquopy\">demo app<\/a>\u00a0has been rewritten to use this framework, giving the following improvements:\n<ul>\n<li>Code input in the REPL is now executed on a background thread.<\/li>\n<li>The REPL can now be terminated by typing\u00a0<code>exit()<\/code>, then restarted by pressing back and re-entering the activity.<\/li>\n<li>Stderr is now shown in red.<\/li>\n<li>Scrolling, rotation and state restoration are all more reliable.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>This version adds the following feature: The Python standard library is now loaded from compiled .pyc files by default (see\u00a0documentation). As a result, startup of a minimal app is now 20-30% faster with Python 2, and 50-60% faster with Python 3. (Python 3 startup is still slower than Python 2, but only by 15-20%.) And [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/chaquo.com\/chaquopy\/wp-json\/wp\/v2\/posts\/296"}],"collection":[{"href":"https:\/\/chaquo.com\/chaquopy\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chaquo.com\/chaquopy\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chaquo.com\/chaquopy\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/chaquo.com\/chaquopy\/wp-json\/wp\/v2\/comments?post=296"}],"version-history":[{"count":3,"href":"https:\/\/chaquo.com\/chaquopy\/wp-json\/wp\/v2\/posts\/296\/revisions"}],"predecessor-version":[{"id":300,"href":"https:\/\/chaquo.com\/chaquopy\/wp-json\/wp\/v2\/posts\/296\/revisions\/300"}],"wp:attachment":[{"href":"https:\/\/chaquo.com\/chaquopy\/wp-json\/wp\/v2\/media?parent=296"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chaquo.com\/chaquopy\/wp-json\/wp\/v2\/categories?post=296"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chaquo.com\/chaquopy\/wp-json\/wp\/v2\/tags?post=296"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}